From 84d0d9908ea4c2d8dc8cfcaa17c94521a7305fac Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 11 Apr 2014 11:39:45 +0200 Subject: parse all -l -m arguments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/nightshift.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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] -- cgit v1.2.3-70-g09d2