Skip to content

Commit 7da8c0a

Browse files
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 (cherry picked from commit 855df7f) Co-authored-by: Daniel Hahler <[email protected]>
1 parent e3c25fc commit 7da8c0a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Lib/pdb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1657,7 +1657,7 @@ def help():
16571657
def main():
16581658
import getopt
16591659

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

16621662
if not args:
16631663
print(_usage)
Lines changed: 1 addition & 0 deletions
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)