From eb167737041d8754988d153e0495268f03b6e809 Mon Sep 17 00:00:00 2001
From: Chris Larson <chris_larson@mentor.com>
Date: Tue, 30 Mar 2010 16:59:46 -0700
Subject: 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>
---
 bitbake/lib/bb/data_smart.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'bitbake/lib')

diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index 54ed72823..55a6f3143 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -50,7 +50,7 @@ class DataSmart:
         self._seen_overrides = seen
 
         self.expand_cache = {}
-        self.expand_context = {
+        self.expand_globals = {
             "os": os,
             "bb": bb,
             "time": time,
@@ -72,7 +72,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_context)
+            s = eval(codeobj, self.expand_globals, {})
             if type(s) == types.IntType: s = str(s)
             return s
 
-- 
cgit v1.2.3