diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-12-23 12:32:06 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-12-23 12:34:37 +0000 |
commit | f28ee1bb03cb32d3757fbef67c9fbe143e3dadfa (patch) | |
tree | f8862bb9259dcd65ad9a2805024a09c4c640001f /lib/bb/data_smart.py | |
parent | 231cae9f9b552ec6737795c098d1de426b5adcbc (diff) | |
download | bitbake-f28ee1bb03cb32d3757fbef67c9fbe143e3dadfa.tar.gz |
data_smart: Ensure d.keys() doesn't list deleted variables
If you copy the datastore, then delete a variable, it still shows up
in d.keys() when it should not. This patch addresses the issue.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/data_smart.py')
-rw-r--r-- | lib/bb/data_smart.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py index 31ce9a5d1..68d273b3a 100644 --- a/lib/bb/data_smart.py +++ b/lib/bb/data_smart.py @@ -740,12 +740,16 @@ class DataSmart(MutableMapping): yield key def __iter__(self): + deleted = set() def keylist(d): klist = set() for key in d: if key == "_data": continue + if key in deleted: + continue if not d[key]: + deleted.add(key) continue klist.add(key) |