lilfix
authorDaniel Robbins <drobbins@gentoo.org>
Thu, 6 Nov 2003 02:45:35 +0000 (02:45 +0000)
committerDaniel Robbins <drobbins@gentoo.org>
Thu, 6 Nov 2003 02:45:35 +0000 (02:45 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@52 d1e1f19c-881f-0410-ab34-b69fee027534

modules/targets.py

index 5e2f06015666df678c9107af27cd731689c3a6eb..79870c12af99167cdb54a14084d600a79e334870 100644 (file)
@@ -37,7 +37,10 @@ class generic_stage_target(generic_target):
                self.archmap={}
                self.subarchmap={}
                for x in targetmap[self.settings["hostarch"]]:
-                       fh=open("arch/"+x+".py")
+                       try:
+                               fh=open(self.settings["sharedir"]+"/arch/"+x+".py")
+                       except IOError:
+                               raise CatalystError, "Can't find "+x+".py plugin in "+self.settings["sharedir"]+"/arch/"
                        #this next line loads the plugin as a module and assigns it to archmap[x]
                        self.archmap[x]=imp.load_module(x,fh,"arch/"+x+".py",(".py","r",imp.PY_SOURCE))
                        #this next line registers all the subarches supported in the plugin