summaryrefslogtreecommitdiffstats
path: root/lib/bb/data_smart.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-07 07:05:58 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-12 22:50:27 +0100
commita97ce216cfe44136f742383542954bfce027831e (patch)
treed24cb764934f5373ad9d2e4e6f4e5c94f2cf9064 /lib/bb/data_smart.py
parent77fc57c610d7f65f7e328ad555f525b2f8bdf1d7 (diff)
downloadbitbake-a97ce216cfe44136f742383542954bfce027831e.tar.gz
data_smart: Fix data expansion cache issues
The expand cache can be cleared in the middle of getVar now due to the use of operations like delVar. We therefore need to check if variables are in the cache before accessing in case it was cleared. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/data_smart.py')
-rw-r--r--lib/bb/data_smart.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py
index b9c5d1e5b..b7ccab767 100644
--- a/lib/bb/data_smart.py
+++ b/lib/bb/data_smart.py
@@ -682,7 +682,7 @@ class DataSmart(MutableMapping):
filtered = filter(lambda v: v not in removes,
value.split())
value = " ".join(filtered)
- if expand:
+ if expand and var in self.expand_cache:
# We need to ensure the expand cache has the correct value
# flag == "_content" here
self.expand_cache[var].value = value