Bugfix: it choked on an empty argument!

This commit is contained in:
Guido van Rossum 1992-01-09 11:37:07 +00:00
parent a8d754e876
commit 70083dee12
1 changed files with 1 additions and 1 deletions

View File

@ -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