From 7c2246638a57aa9aa4b1efc8a5e36e08313e7b10 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 2 Mar 2010 20:38:22 +0000 Subject: [PATCH] Bail out when given an invalid mode. (trunk r15394) svn path=/main/branches/2.1.7/; revision=15616 --- bin/repoman | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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' -- 2.26.2