summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-09-21 02:04:47 +0000
committerZac Medico <zmedico@gentoo.org>2009-09-21 02:04:47 +0000
commit87c637ed014f35b0d5df1c54129da8d82c83116b (patch)
treeba8b26f1c8b0d9c996c82f8e63b7a444ebe89437 /pym
parent24d578fb0261845a025d9967ddad56cb5f5b6b4d (diff)
downloadportage-87c637ed014f35b0d5df1c54129da8d82c83116b.tar.gz
portage-87c637ed014f35b0d5df1c54129da8d82c83116b.tar.bz2
portage-87c637ed014f35b0d5df1c54129da8d82c83116b.zip
When generating config.prevmaskdict, only call the Atom constructor when
necessary. svn path=/main/trunk/; revision=14312
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 4b68cefb2..f0cc471e9 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -1725,7 +1725,9 @@ class config(object):
# revmaskdict
self.prevmaskdict={}
for x in self.packages:
- x = portage.dep.Atom(x.lstrip('*'))
+ # Negative atoms are filtered by the above stack_lists() call.
+ if not isinstance(x, dep.Atom):
+ x = dep.Atom(x.lstrip('*'))
self.prevmaskdict.setdefault(x.cp, []).append(x)
self._pkeywords_list = []