From: Guido van Rossum Date: Thu, 9 Jan 1992 11:37:07 +0000 (+0000) Subject: Bugfix: it choked on an empty argument! X-Git-Tag: v0.9.8~619 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70083dee1203992fff93c0d659df51c6286c3e19;p=thirdparty%2FPython%2Fcpython.git Bugfix: it choked on an empty argument! --- diff --git a/Lib/getopt.py b/Lib/getopt.py index 0b71d0f3a7af..7feaf9d52520 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