diff options
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/data_smart.py | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index 93c1b81aee..1fede8f01e 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py | |||
@@ -401,18 +401,20 @@ class DataSmart(MutableMapping): | |||
401 | yield key | 401 | yield key |
402 | 402 | ||
403 | def __iter__(self): | 403 | def __iter__(self): |
404 | seen = set() | 404 | def keylist(d): |
405 | def _keys(d): | 405 | klist = set() |
406 | for key in d: | ||
407 | if key == "_data": | ||
408 | continue | ||
409 | klist.add(key) | ||
410 | |||
406 | if "_data" in d: | 411 | if "_data" in d: |
407 | for key in _keys(d["_data"]): | 412 | klist |= keylist(d["_data"]) |
408 | yield key | ||
409 | 413 | ||
410 | for key in d: | 414 | return klist |
411 | if key != "_data": | 415 | |
412 | if not key in seen: | 416 | for k in keylist(self.dict): |
413 | seen.add(key) | 417 | yield k |
414 | yield key | ||
415 | return _keys(self.dict) | ||
416 | 418 | ||
417 | def __len__(self): | 419 | def __len__(self): |
418 | return len(frozenset(self)) | 420 | return len(frozenset(self)) |