ExtendedAtomDict: Add __delitem__
authorSebastian Luther <SebastianLuther@gmx.de>
Tue, 24 Aug 2010 08:19:17 +0000 (10:19 +0200)
committerZac Medico <zmedico@gentoo.org>
Tue, 24 Aug 2010 13:13:39 +0000 (06:13 -0700)
pym/portage/dep/__init__.py

index 8fc472819c7ab04cf8c950385a04475feb8a0bac..7233305715d0d1b7b8fc422f508cddbc1170c833 100644 (file)
@@ -1151,6 +1151,12 @@ class ExtendedAtomDict(portage.cache.mappings.MutableMapping):
                for item in self._extended.items():
                        yield item
 
+       def __delitem__(self, cp):
+               if "*" in cp:
+                       return self._extended.__delitem__(cp)
+               else:
+                       return self._normal.__delitem__(cp)
+
        if sys.hexversion >= 0x3000000:
                keys = __iter__
                items = iteritems