Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 70083de

Browse files
committed
Bugfix: it choked on an empty argument!
1 parent a8d754e commit 70083de

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/getopt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
def getopt(args, options):
2424
list = []
25-
while args and args[0][0] == '-' and args[0] <> '-':
25+
while args and args[0][:1] == '-' and args[0] <> '-':
2626
if args[0] == '--':
2727
args = args[1:]
2828
break

0 commit comments

Comments
 (0)