mirror of
https://git.yoctoproject.org/poky
synced 2026-09-24 13:36:22 +02:00
For ${@}, run str() on the result
(Bitbake rev: cf1a51eab11f645c95e5fa278221f78c129b9dd1) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
committed by
Richard Purdie
parent
15248f3e7d
commit
1e7a03cb58
@@ -65,9 +65,8 @@ class DataSmart:
|
|||||||
def python_sub(match):
|
def python_sub(match):
|
||||||
code = match.group()[3:-1]
|
code = match.group()[3:-1]
|
||||||
codeobj = compile(code.strip(), varname or "<expansion>", "eval")
|
codeobj = compile(code.strip(), varname or "<expansion>", "eval")
|
||||||
s = utils.better_eval(codeobj, {"d": self})
|
value = utils.better_eval(codeobj, {"d": self})
|
||||||
if isinstance(s, int): s = str(s)
|
return str(value)
|
||||||
return s
|
|
||||||
|
|
||||||
if not isinstance(s, basestring): # sanity check
|
if not isinstance(s, basestring): # sanity check
|
||||||
return s
|
return s
|
||||||
@@ -80,9 +79,8 @@ class DataSmart:
|
|||||||
try:
|
try:
|
||||||
s = __expand_var_regexp__.sub(var_sub, s)
|
s = __expand_var_regexp__.sub(var_sub, s)
|
||||||
s = __expand_python_regexp__.sub(python_sub, s)
|
s = __expand_python_regexp__.sub(python_sub, s)
|
||||||
if s == olds: break
|
if s == olds:
|
||||||
if not isinstance(s, basestring): # sanity check
|
break
|
||||||
bb.msg.error(bb.msg.domain.Data, 'expansion of %s returned non-string %s' % (olds, s))
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
raise
|
raise
|
||||||
except:
|
except:
|
||||||
|
|||||||
Reference in New Issue
Block a user