summaryrefslogtreecommitdiff
path: root/classes/base.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'classes/base.bbclass')
-rw-r--r--classes/base.bbclass6
1 files changed, 6 insertions, 0 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index 51648dae92..aed927404a 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -159,6 +159,12 @@ def base_read_file(filename):
return f.read().strip()
return None
+def base_ifelse(condition, iftrue = True, iffalse = False):
+ if condition:
+ return iftrue
+ else:
+ return iffalse
+
def base_conditional(variable, checkvalue, truevalue, falsevalue, d):
import bb
if bb.data.getVar(variable,d,1) == checkvalue: