From: Zac Medico Date: Fri, 19 Feb 2010 20:33:56 +0000 (-0000) Subject: Bail out when given an invalid mode. X-Git-Tag: v2.2_rc63~13 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=ca9b96c7b470cfcc372bdae533bdff76b0044723;p=portage.git Bail out when given an invalid mode. svn path=/main/trunk/; revision=15394 --- diff --git a/bin/repoman b/bin/repoman index 92f9cc1bf..a67fae8dd 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'