From 5b216c8000dbc3ed9f3e996242eb24269fcaf919 Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Sun, 11 Apr 2010 17:21:14 -0700 Subject: Add __contains__ to COWDictMeta (Bitbake rev: b3b314aade1f0a04e888361e1ac946e5195e1509) Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- bitbake/lib/bb/COW.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bitbake') diff --git a/bitbake/lib/bb/COW.py b/bitbake/lib/bb/COW.py index b0afb5fa0..ccb7cde3b 100644 --- a/bitbake/lib/bb/COW.py +++ b/bitbake/lib/bb/COW.py @@ -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__: -- cgit v1.2.3