From 70083dee1203992fff93c0d659df51c6286c3e19 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 9 Jan 1992 11:37:07 +0000 Subject: [PATCH] Bugfix: it choked on an empty argument! --- Lib/getopt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/getopt.py b/Lib/getopt.py index 0b71d0f3a7a..7feaf9d5252 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