From 5e30a11c06637f981e333d01b01028eddb01b485 Mon Sep 17 00:00:00 2001 From: Andrew Gaffney Date: Sat, 10 Jan 2009 21:02:59 -0600 Subject: [PATCH] Remove check for sys.argv length since we already check for needed arguments later on --- ChangeLog | 4 ++++ catalyst | 6 +----- 2 files changed, 5 insertions(+), 5 deletions(-) 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",\ -- 2.26.2