Skip to content

Commit 855df7f

Browse files
blueyedbenjaminp
authored andcommitted
closes bpo-37803: pdb: fix handling of options (--help / --version) (GH-15193)
The "--" should not be included with long options passed to getopt.getopt. Fixes https://bugs.python.org/issue37803
1 parent b1a2abd commit 855df7f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Lib/pdb.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1660,7 +1660,7 @@ def help():
16601660
def main():
16611661
import getopt
16621662

1663-
opts, args = getopt.getopt(sys.argv[1:], 'mhc:', ['--help', '--command='])
1663+
opts, args = getopt.getopt(sys.argv[1:], 'mhc:', ['help', 'command='])
16641664

16651665
if not args:
16661666
print(_usage)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pdb's ``--help`` and ``--version`` long options now work.

0 commit comments

Comments
 (0)