From: Andrew Gaffney Date: Sun, 11 Jan 2009 03:02:59 +0000 (-0600) Subject: Remove check for sys.argv length since we already check for needed arguments later on X-Git-Tag: CATALYST-2.0.10~3^2~225 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5e30a11c06637f981e333d01b01028eddb01b485;p=catalyst.git Remove check for sys.argv length since we already check for needed arguments later on --- diff --git a/ChangeLog b/ChangeLog index 47271d20..2128b098 100644 --- 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 catalyst: + Remove check for sys.argv length since we already check for needed + arguments later on + 11 Jan 2009; Andrew Gaffney catalyst: Rename version() to show_version() diff --git a/catalyst b/catalyst index 7c625676..0b89facc 100755 --- 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",\