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.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index 55a6f3143c..77f1861381 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -50,12 +50,6 @@ 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_globals = {
54 "os": os,
55 "bb": bb,
56 "time": time,
57 "d": self
58 }
59 53
60 def expand(self,s, varname): 54 def expand(self,s, varname):
61 def var_sub(match): 55 def var_sub(match):
@@ -72,7 +66,7 @@ class DataSmart:
72 def python_sub(match): 66 def python_sub(match):
73 code = match.group()[3:-1] 67 code = match.group()[3:-1]
74 codeobj = compile(code.strip(), varname or "<expansion>", "eval") 68 codeobj = compile(code.strip(), varname or "<expansion>", "eval")
75 s = eval(codeobj, self.expand_globals, {}) 69 s = utils.better_eval(codeobj, {"d": self})
76 if type(s) == types.IntType: s = str(s) 70 if type(s) == types.IntType: s = str(s)
77 return s 71 return s
78 72