diff options
Diffstat (limited to 'Lib/getopt.py')
-rw-r--r-- | Lib/getopt.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/getopt.py b/Lib/getopt.py index f76d3deb68..251d89c5cf 100644 --- a/Lib/getopt.py +++ b/Lib/getopt.py @@ -1,4 +1,3 @@ -# -*- coding: iso-8859-1 -*- """Parser for command line options. This module helps scripts to parse the command line arguments in @@ -20,7 +19,7 @@ option involved with the exception. # Gerrit Holl <gerrit@nl.linux.org> moved the string-based exceptions # to class-based exceptions. # -# Peter Åstrand <astrand@lysator.liu.se> added gnu_getopt(). +# Peter Astrand <astrand@lysator.liu.se> added gnu_getopt(). # # TODO for gnu_getopt(): # @@ -130,7 +129,7 @@ def gnu_getopt(args, shortopts, longopts = []): if args[0][:2] == '--': opts, args = do_longs(opts, args[0][2:], longopts, args[1:]) - elif args[0][:1] == '-': + elif args[0][:1] == '-' and args[0] != '-': opts, args = do_shorts(opts, args[0][1:], shortopts, args[1:]) else: if all_options_first: |