import fix 2
authorDaniel Robbins <drobbins@gentoo.org>
Thu, 6 Nov 2003 02:41:01 +0000 (02:41 +0000)
committerDaniel Robbins <drobbins@gentoo.org>
Thu, 6 Nov 2003 02:41:01 +0000 (02:41 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@51 d1e1f19c-881f-0410-ab34-b69fee027534

catalyst

index f533d82448184376c6222e96a0bec90499522f76..fcc3d5189be65c72837e70cb513d3d672541ef6b 100755 (executable)
--- a/catalyst
+++ b/catalyst
@@ -9,10 +9,6 @@ if len(sys.argv)==1 or sys.argv[1] in ["-h","--help"]:
        usage()
        sys.exit(1)
 
-import targets
-targetmap={}
-targets.register(targetmap)
-
 if os.getuid()!=0:
        #non-root callers can't go any further than here. 
        die("This script requires root privileges to operate.") 
@@ -41,10 +37,14 @@ for x in confdefaults.keys():
 sys.path.append(myspec["sharedir"]+"/modules")
 try:
        from catalyst_support import *
+       import targets
 except ImportError:
-       print "catalyst: catalyst_support module not found in "+myspec["sharedir"]+"/modules; exiting."
+       print "catalyst: python modules not found in "+myspec["sharedir"]+"/modules; exiting."
        sys.exit(1)
 
+targetmap={}
+targets.register(targetmap)
+
 if "ccache" in string.split(myspec["options"]):
        print "Compiler cache support enabled."
        myspec["CCACHE"]="1"