Commit 70083dee authored by Guido van Rossum's avatar Guido van Rossum

Bugfix: it choked on an empty argument!

parent a8d754e8
...@@ -22,7 +22,7 @@ error = 'getopt error' ...@@ -22,7 +22,7 @@ error = 'getopt error'
def getopt(args, options): def getopt(args, options):
list = [] list = []
while args and args[0][0] == '-' and args[0] <> '-': while args and args[0][:1] == '-' and args[0] <> '-':
if args[0] == '--': if args[0] == '--':
args = args[1:] args = args[1:]
break break
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment