diff options
author | Guido van Rossum <guido@python.org> | 1992-01-09 11:37:07 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1992-01-09 11:37:07 (GMT) |
commit | 70083dee1203992fff93c0d659df51c6286c3e19 (patch) | |
tree | 9e79175a2b75a5e32530dbead439ec167fb39686 /Lib/getopt.py | |
parent | a8d754e87677b98ec7a7a72894b1d7d186291aeb (diff) | |
download | cpython-70083dee1203992fff93c0d659df51c6286c3e19.zip cpython-70083dee1203992fff93c0d659df51c6286c3e19.tar.gz cpython-70083dee1203992fff93c0d659df51c6286c3e19.tar.bz2 |
Bugfix: it choked on an empty argument!
Diffstat (limited to 'Lib/getopt.py')
-rw-r--r-- | Lib/getopt.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/getopt.py b/Lib/getopt.py index 0b71d0f..7feaf9d 100644 --- a/Lib/getopt.py +++ b/Lib/getopt.py @@ -22,7 +22,7 @@ error = 'getopt error' def getopt(args, options): list = [] - while args and args[0][0] == '-' and args[0] <> '-': + while args and args[0][:1] == '-' and args[0] <> '-': if args[0] == '--': args = args[1:] break |