summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-01-09 11:37:07 (GMT)
committerGuido van Rossum <guido@python.org>1992-01-09 11:37:07 (GMT)
commit70083dee1203992fff93c0d659df51c6286c3e19 (patch)
tree9e79175a2b75a5e32530dbead439ec167fb39686
parenta8d754e87677b98ec7a7a72894b1d7d186291aeb (diff)
downloadcpython-70083dee1203992fff93c0d659df51c6286c3e19.zip
cpython-70083dee1203992fff93c0d659df51c6286c3e19.tar.gz
cpython-70083dee1203992fff93c0d659df51c6286c3e19.tar.bz2
Bugfix: it choked on an empty argument!
-rw-r--r--Lib/getopt.py2
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