mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Bugfix: it choked on an empty argument!
This commit is contained in:
parent
a8d754e876
commit
70083dee12
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ error = 'getopt error'
|
||||||
|
|
||||||
def getopt(args, options):
|
def getopt(args, options):
|
||||||
list = []
|
list = []
|
||||||
while args and args[0][0] == '-' and args[0] <> '-':
|
while args and args[0][:1] == '-' and args[0] <> '-':
|
||||||
if args[0] == '--':
|
if args[0] == '--':
|
||||||
args = args[1:]
|
args = args[1:]
|
||||||
break
|
break
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue