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

svn path=/main/branches/2.1.7/; revision=14661

pym/portage/_sets/__init__.py

index 9e971451d9cdaa79192fe206e8cb23b6a8ffac05..3baa6f4cb782ac21fe7dee77007622fef2ed8d9e 100644 (file)
@@ -178,7 +178,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"):