summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-02-19 20:33:56 +0000
committerZac Medico <zmedico@gentoo.org>2010-02-19 20:33:56 +0000
commitca9b96c7b470cfcc372bdae533bdff76b0044723 (patch)
tree39051404c01e3b1dbef57362782ea103f1a56753
parent332b3fa43b80117a485959f55c98c08b8a1504ca (diff)
downloadportage-ca9b96c7b470cfcc372bdae533bdff76b0044723.tar.gz
portage-ca9b96c7b470cfcc372bdae533bdff76b0044723.tar.bz2
portage-ca9b96c7b470cfcc372bdae533bdff76b0044723.zip
Bail out when given an invalid mode.
svn path=/main/trunk/; revision=15394
-rwxr-xr-xbin/repoman4
1 files changed, 3 insertions, 1 deletions
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'