summaryrefslogtreecommitdiffstats
path: root/lib/bb/data_smart.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bb/data_smart.py')
-rw-r--r--lib/bb/data_smart.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py
index 55a6f3143..77f186138 100644
--- a/lib/bb/data_smart.py
+++ b/lib/bb/data_smart.py
@@ -50,12 +50,6 @@ class DataSmart:
self._seen_overrides = seen
self.expand_cache = {}
- self.expand_globals = {
- "os": os,
- "bb": bb,
- "time": time,
- "d": self
- }
def expand(self,s, varname):
def var_sub(match):
@@ -72,7 +66,7 @@ class DataSmart:
def python_sub(match):
code = match.group()[3:-1]
codeobj = compile(code.strip(), varname or "<expansion>", "eval")
- s = eval(codeobj, self.expand_globals, {})
+ s = utils.better_eval(codeobj, {"d": self})
if type(s) == types.IntType: s = str(s)
return s