diff options
Diffstat (limited to 'bitbake/lib/bb/COW.py')
-rw-r--r-- | bitbake/lib/bb/COW.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bitbake/lib/bb/COW.py b/bitbake/lib/bb/COW.py index 76bc08a3ea..4af03c54ad 100644 --- a/bitbake/lib/bb/COW.py +++ b/bitbake/lib/bb/COW.py | |||
@@ -36,8 +36,9 @@ class COWDictMeta(COWMeta): | |||
36 | __marker__ = tuple() | 36 | __marker__ = tuple() |
37 | 37 | ||
38 | def __str__(cls): | 38 | def __str__(cls): |
39 | # FIXME: I have magic numbers! | 39 | ignored_keys = set(["__count__", "__doc__", "__module__", "__firstlineno__", "__static_attributes__"]) |
40 | return "<COWDict Level: %i Current Keys: %i>" % (cls.__count__, len(cls.__dict__) - 3) | 40 | keys = set(cls.__dict__.keys()) - ignored_keys |
41 | return "<COWDict Level: %i Current Keys: %i>" % (cls.__count__, len(keys)) | ||
41 | 42 | ||
42 | __repr__ = __str__ | 43 | __repr__ = __str__ |
43 | 44 | ||
@@ -161,8 +162,9 @@ class COWDictMeta(COWMeta): | |||
161 | 162 | ||
162 | class COWSetMeta(COWDictMeta): | 163 | class COWSetMeta(COWDictMeta): |
163 | def __str__(cls): | 164 | def __str__(cls): |
164 | # FIXME: I have magic numbers! | 165 | ignored_keys = set(["__count__", "__doc__", "__module__", "__firstlineno__", "__static_attributes__"]) |
165 | return "<COWSet Level: %i Current Keys: %i>" % (cls.__count__, len(cls.__dict__) - 3) | 166 | keys = set(cls.__dict__.keys()) - ignored_keys |
167 | return "<COWSet Level: %i Current Keys: %i>" % (cls.__count__, len(keys)) | ||
166 | 168 | ||
167 | __repr__ = __str__ | 169 | __repr__ = __str__ |
168 | 170 | ||