Commit 855df7f2 authored by Daniel Hahler's avatar Daniel Hahler Committed by Benjamin Peterson

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
parent b1a2abdb
...@@ -1660,7 +1660,7 @@ To let the script run up to a given line X in the debugged file, use ...@@ -1660,7 +1660,7 @@ To let the script run up to a given line X in the debugged file, use
def main(): def main():
import getopt import getopt
opts, args = getopt.getopt(sys.argv[1:], 'mhc:', ['--help', '--command=']) opts, args = getopt.getopt(sys.argv[1:], 'mhc:', ['help', 'command='])
if not args: if not args:
print(_usage) print(_usage)
......
pdb's ``--help`` and ``--version`` long options now work.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment