summaryrefslogtreecommitdiffstats
path: root/Lib/getopt.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/getopt.py')
-rw-r--r--Lib/getopt.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/getopt.py b/Lib/getopt.py
index 66f4827..251d89c 100644
--- a/Lib/getopt.py
+++ b/Lib/getopt.py
@@ -155,7 +155,7 @@ def do_longs(opts, opt, longopts, args):
if not args:
raise GetoptError('option --%s requires argument' % opt, opt)
optarg, args = args[0], args[1:]
- elif optarg:
+ elif optarg is not None:
raise GetoptError('option --%s must not have an argument' % opt, opt)
opts.append(('--' + opt, optarg or ''))
return opts, args