allow the portage.sets. prefix to be omitted in 'class' options of set definitions
authorMarius Mauch <genone@gentoo.org>
Mon, 29 Sep 2008 00:18:59 +0000 (00:18 -0000)
committerMarius Mauch <genone@gentoo.org>
Mon, 29 Sep 2008 00:18:59 +0000 (00:18 -0000)
svn path=/main/trunk/; revision=11599

pym/portage/sets/__init__.py

index d6b3b5e87fe5bf2bdd5d68758b81da13b5a784fd..7ac6502b756bd862fea5219a72fa1c07ddb6487d 100644 (file)
@@ -70,8 +70,11 @@ class SetConfig(SafeConfigParser):
                        try:
                                setclass = load_mod(classname)
                        except (ImportError, AttributeError):
-                               self.errors.append("Could not import '%s' for section '%s'" % (classname, sname))
-                               continue
+                               try:
+                                       setclass = load_mod("portage.sets."+classname)
+                               except (ImportError, AttributeError):
+                                       self.errors.append("Could not import '%s' for section '%s'" % (classname, sname))
+                                       continue
                        # prepare option dict for the current section
                        optdict = {}
                        for oname in self.options(sname):