diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-04-11 11:39:45 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-04-11 11:39:45 +0200 |
commit | 84d0d9908ea4c2d8dc8cfcaa17c94521a7305fac (patch) | |
tree | 22dc7442a1367a2a602738f067f937aa9f9a24a1 | |
parent | parse help requests for -l and -m (diff) | |
download | nightshift-84d0d9908ea4c2d8dc8cfcaa17c94521a7305fac.tar.gz nightshift-84d0d9908ea4c2d8dc8cfcaa17c94521a7305fac.tar.bz2 nightshift-84d0d9908ea4c2d8dc8cfcaa17c94521a7305fac.tar.xz |
parse all -l -m arguments
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rwxr-xr-x | src/nightshift.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nightshift.py b/src/nightshift.py index 6ef2750..bda864b 100755 --- a/src/nightshift.py +++ b/src/nightshift.py @@ -223,7 +223,8 @@ for arg in sys.argv[1:]: # Parse help request for -l and -m for opt in ('-l', '-m'): - if opt in red_opts: + i = 0 + while opt in red_opts[i:]: i = red_opts.index(opt) + 1 if not i == len(red_opts): arg = red_opts[i] |