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
This commit is contained in:
Daniel Hahler 2019-09-12 17:46:37 +02:00 committed by Benjamin Peterson
parent b1a2abdb06
commit 855df7f273
2 changed files with 2 additions and 1 deletions

View File

@ -1660,7 +1660,7 @@ To let the script run up to a given line X in the debugged file, use
def main():
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:
print(_usage)

View File

@ -0,0 +1 @@
pdb's ``--help`` and ``--version`` long options now work.