bitbake: 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.

(Bitbake rev: a97ce216cfe44136f742383542954bfce027831e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2015-06-07 07:05:58 +00:00
parent a259968611
commit 75a58555ab
1 changed files with 1 additions and 1 deletions

View File

@ -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