Move catalyst.support import to top of file
authorAndrew Gaffney <agaffney@gentoo.org>
Sun, 11 Jan 2009 03:06:28 +0000 (21:06 -0600)
committerAndrew Gaffney <agaffney@gentoo.org>
Sun, 11 Jan 2009 03:06:28 +0000 (21:06 -0600)
ChangeLog
catalyst

index 2128b0981456c944ebe9934e57553fc9ef71aaa6..40ea8ca16fa7474462015feb81fabf80455cbe3c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
 # Copyright 2002-2009 Gentoo Foundation; 2008-2009 Various authors (see AUTHORS)
 # Distributed under the GPL v2
 
+  11 Jan 2009; Andrew Gaffney <agaffney@gentoo.org> catalyst:
+  Move catalyst.support import to top of file
+
   11 Jan 2009; Andrew Gaffney <agaffney@gentoo.org> catalyst:
   Remove check for sys.argv length since we already check for needed
   arguments later on
index 0b89facce55a0e178900051e46716079f576bcad..97d407f0ec874497fc939d8b69cdc17339ee9437 100755 (executable)
--- a/catalyst
+++ b/catalyst
@@ -15,6 +15,7 @@ sys.path.append(__selfpath__ + "/modules")
 import catalyst.config
 import catalyst.util
 import catalyst.target
+from catalyst.support import *
 
 __maintainer__="Chris Gianelloni <wolf31o2@gentoo.org>"
 __version__="2.99"
@@ -271,10 +272,7 @@ if __name__ == "__main__":
                usage()
                sys.exit(2)
 
-       # import configuration file and import our main module using those settings
        parse_config(myconfig)
-
-       from catalyst.support import *
        
        # Start checking that digests are valid now that the hash_map was imported from catalyst_support
        if conf_values.has_key("digests"):
@@ -295,6 +293,7 @@ if __name__ == "__main__":
                                print
                                print "Catalyst aborting...."
                                sys.exit(2)
+
        if conf_values.has_key("hash_function"):
                if not hash_map.has_key(conf_values["hash_function"]):
                        print
@@ -341,23 +340,22 @@ if __name__ == "__main__":
                print
                print "Catalyst aborting...."
                sys.exit(2)
+
        except KeyboardInterrupt:
                print "\nCatalyst build aborted due to user interrupt ( Ctrl-C )"
                print
                print "Catalyst aborting...."
                sys.exit(2)
+
        except LockInUse:
                print "Catalyst aborting...."
                sys.exit(2)
+
        except:
                print "Catalyst aborting...."
                raise
                sys.exit(2)
 
-       #except CatalystError:
-       #       print
-       #       print "Catalyst aborting...."
-       #       sys.exit(2)
        #except KeyError:
        #       print "\nproblem with command line or spec file ( Key Error )"
        #       print "Key: "+str(sys.exc_value)+" was not found"