Add __contains__ to COWDictMeta
(Bitbake rev: b3b314aade1f0a04e888361e1ac946e5195e1509) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
parent
d5927a70bb
commit
5b216c8000
|
@ -119,6 +119,9 @@ class COWDictMeta(COWMeta):
|
|||
key += MUTABLE
|
||||
delattr(cls, key)
|
||||
|
||||
def __contains__(cls, key):
|
||||
return cls.has_key(key)
|
||||
|
||||
def has_key(cls, key):
|
||||
value = cls.__getreadonly__(key, cls.__marker__)
|
||||
if value is cls.__marker__:
|
||||
|
|
Loading…
Reference in New Issue