From: Zac Medico Date: Tue, 2 Mar 2010 20:38:22 +0000 (-0000) Subject: Bail out when given an invalid mode. (trunk r15394) X-Git-Tag: v2.1.8~106 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7c2246638a57aa9aa4b1efc8a5e36e08313e7b10;p=portage.git Bail out when given an invalid mode. (trunk r15394) svn path=/main/branches/2.1.7/; revision=15616 --- diff --git a/bin/repoman b/bin/repoman index 38b06d334..3e770919c 100755 --- a/bin/repoman +++ b/bin/repoman @@ -230,11 +230,13 @@ def ParseArgs(args, qahelp): if opts.mode == 'help': parser.print_help(short=False) - for arg in args: + for arg in args[1:]: if arg in modes: if not opts.mode: opts.mode = arg break + else: + parser.error("invalid mode: %s" % arg) if not opts.mode: opts.mode = 'full'