diff options
| author | Clark Williams <williams@redhat.com> | 2007-11-27 15:35:55 -0600 |
|---|---|---|
| committer | Clark Williams <williams@redhat.com> | 2007-11-27 15:35:55 -0600 |
| commit | 75f7fa7607bf9efefc26f52a68966ee48ee86c27 (patch) | |
| tree | 95497f09f458ba7ac40e442d89aacaaa6e32df54 /src | |
| parent | 4f61b5ab315d53f3b910c0ee33b711fc5b612c80 (diff) | |
| download | mock-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-x | src/mock.py | 2 |
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:] |
