Remove check for sys.argv length since we already check for needed arguments later on
authorAndrew Gaffney <agaffney@gentoo.org>
Sun, 11 Jan 2009 03:02:59 +0000 (21:02 -0600)
committerAndrew Gaffney <agaffney@gentoo.org>
Sun, 11 Jan 2009 03:02:59 +0000 (21:02 -0600)
ChangeLog
catalyst

index 47271d204d998b0a354bc5ce3cbbe5a5805ac760..2128b0981456c944ebe9934e57553fc9ef71aaa6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,10 @@
 # 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:
+  Remove check for sys.argv length since we already check for needed
+  arguments later on
+
   11 Jan 2009; Andrew Gaffney <agaffney@gentoo.org> catalyst:
   Rename version() to show_version()
 
index 7c625676ec9b3d20f1e34862a1367f5820d61d2f..0b89facce55a0e178900051e46716079f576bcad 100755 (executable)
--- a/catalyst
+++ b/catalyst
@@ -183,16 +183,12 @@ def build_target(addlargs, targetmap):
 if __name__ == "__main__":
        
        show_version()
+
        if os.getuid() != 0:
                # catalyst cannot be run as a normal user due to chroots, mounts, etc
                print "!!! catalyst: This script requires root privileges to operate"
                sys.exit(2)
 
-       # we need some options in order to work correctly
-       if len(sys.argv) < 2:
-               usage()
-               sys.exit(2)
-
        # parse out the command line arguments
        try:
                opts,args = getopt.getopt(sys.argv[1:], "apPhvdc:C:f:FVs:", ["purge", "purgeonly", "help", "version", "debug",\