# 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()
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",\