summaryrefslogtreecommitdiff
path: root/bitbake/lib
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-04-20 13:44:06 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-02 15:41:34 +0100
commit15248f3e7d293502e1b7e21bcebef8c800de847e (patch)
treefdb61e27b7cc0f1ee9aa7e8f51dbeeede97d8fca /bitbake/lib
parent9d3f301423090cb27a495e808323a804d1740a90 (diff)
downloadopenembedded-core-15248f3e7d293502e1b7e21bcebef8c800de847e.tar.gz
openembedded-core-15248f3e7d293502e1b7e21bcebef8c800de847e.tar.bz2
openembedded-core-15248f3e7d293502e1b7e21bcebef8c800de847e.zip
Allow emission of non-string objects in emit_var, instead running str() on it first
(Bitbake rev: 5b09e28cb4a2c6c99ad58e71fb803160922a7e1e) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/data.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index 3ff1ac8119..2d04b010cd 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/lib/bb/data.py
@@ -194,9 +194,6 @@ def emit_var(var, o=sys.__stdout__, d = init(), all=False):
if all:
o.write('# %s=%s\n' % (var, oval))
- if not isinstance(val, basestring):
- return 0
-
if (var.find("-") != -1 or var.find(".") != -1 or var.find('{') != -1 or var.find('}') != -1 or var.find('+') != -1) and not all:
return 0
@@ -206,10 +203,11 @@ def emit_var(var, o=sys.__stdout__, d = init(), all=False):
o.write('unset %s\n' % varExpanded)
return 1
- val.rstrip()
if not val:
return 0
+ val = str(val)
+
if func:
# NOTE: should probably check for unbalanced {} within the var
o.write("%s() {\n%s\n}\n" % (varExpanded, val))