Fix PackageSet._updateAtomMap() to use ExtendedAtomDict.setdefault()
authorZac Medico <zmedico@gentoo.org>
Tue, 27 Jul 2010 07:10:15 +0000 (00:10 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 27 Jul 2010 07:10:15 +0000 (00:10 -0700)
since ExtendedAtomDict__getitem__ doesn't allow modification of
items.

pym/portage/sets/base.py

index a143b8272722f5053f5d86d4e69f477010624a9a..33850574d4751711da9bf413bf29035417a69a71 100644 (file)
@@ -109,8 +109,7 @@ class PackageSet(object):
                        self._atommap.clear()
                        atoms = self._atoms
                for a in atoms:
-                       self._atommap.setdefault(a.cp, set())
-                       self._atommap[a.cp].add(a)
+                       self._atommap.setdefault(a.cp, set()).add(a)
        
        # Not sure if this one should really be in PackageSet
        def findAtomForPackage(self, pkg):