summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/data_smart.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/data_smart.py')
-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