Ind SetConfig.getSetAtoms(), don't assume the set has a 'creator' attribute,
authorZac Medico <zmedico@gentoo.org>
Sun, 18 Oct 2009 04:16:05 +0000 (04:16 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 18 Oct 2009 04:16:05 +0000 (04:16 -0000)
since if sets.conf is corrupt then emerge generates fallback sets without
the 'creator' attribute.

svn path=/main/trunk/; revision=14660

pym/portage/sets/__init__.py

index 01ce6605592151e1329ed11c02b20d061270e839..ab67642b87fe13912cf8c23f03b19775ff8d74c6 100644 (file)
@@ -161,7 +161,10 @@ class SetConfig(object):
                
                if ignorelist is None:
                        ignorelist = set()
-               if not setname in ignorelist:
+
+               # If sets.conf is corrupt then emerge generates
+               # fallback sets without the 'creator' attribute.
+               if setname not in ignorelist and hasattr(myset, 'creator'):
                        if parser.has_option(myset.creator, "extend"):
                                extend.update(parser.get(myset.creator, "extend").split())
                        if parser.has_option(myset.creator, "remove"):