summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorClark Williams <williams@redhat.com>2007-11-27 15:35:55 -0600
committerClark Williams <williams@redhat.com>2007-11-27 15:35:55 -0600
commit75f7fa7607bf9efefc26f52a68966ee48ee86c27 (patch)
tree95497f09f458ba7ac40e442d89aacaaa6e32df54 /src
parent4f61b5ab315d53f3b910c0ee33b711fc5b612c80 (diff)
downloadmock-75f7fa7607bf9efefc26f52a68966ee48ee86c27.tar.gz
mock-75f7fa7607bf9efefc26f52a68966ee48ee86c27.tar.xz
mock-75f7fa7607bf9efefc26f52a68966ee48ee86c27.zip
add length check to old behavior check in command_parse()
Diffstat (limited to 'src')
-rwxr-xr-xsrc/mock.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mock.py b/src/mock.py
index 851acb9..c7087cb 100755
--- a/src/mock.py
+++ b/src/mock.py
@@ -106,7 +106,7 @@ def command_parse(config_opts):
default=[], help="Disable plugin. Currently-available plugins: %s" % repr(config_opts['plugins']))
(options, args) = parser.parse_args()
- if args[0] in ('chroot', 'shell', 'rebuild', 'install', 'installdeps', 'init', 'clean'):
+ if len(args) and args[0] in ('chroot', 'shell', 'rebuild', 'install', 'installdeps', 'init', 'clean'):
options.mode = args[0]
args = args[1:]