summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-03-30 16:59:46 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-02 15:41:31 +0100
commiteb167737041d8754988d153e0495268f03b6e809 (patch)
tree192e2578ed1889fa93835c4d6027382f58403bb0 /bitbake/lib
parentd8c8612d92fd243d395c97285f8c9b5d80a93b45 (diff)
downloadpoky-eb167737041d8754988d153e0495268f03b6e809.tar.gz
Pass an empty locals dict in expansion, since list comprehensions apparently leak their '_' helper variable
(Bitbake rev: 97da0cebbaf4dd1b46e58bd2e80cab6c007ae7c9) 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_smart.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index 54ed72823b..55a6f3143c 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -50,7 +50,7 @@ class DataSmart:
50 self._seen_overrides = seen 50 self._seen_overrides = seen
51 51
52 self.expand_cache = {} 52 self.expand_cache = {}
53 self.expand_context = { 53 self.expand_globals = {
54 "os": os, 54 "os": os,
55 "bb": bb, 55 "bb": bb,
56 "time": time, 56 "time": time,
@@ -72,7 +72,7 @@ class DataSmart:
72 def python_sub(match): 72 def python_sub(match):
73 code = match.group()[3:-1] 73 code = match.group()[3:-1]
74 codeobj = compile(code.strip(), varname or "<expansion>", "eval") 74 codeobj = compile(code.strip(), varname or "<expansion>", "eval")
75 s = eval(codeobj, self.expand_context) 75 s = eval(codeobj, self.expand_globals, {})
76 if type(s) == types.IntType: s = str(s) 76 if type(s) == types.IntType: s = str(s)
77 return s 77 return s
78 78