mirror of
https://github.com/python/cpython.git
synced 2024-11-24 18:34:43 +08:00
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:
parent
b1a2abdb06
commit
855df7f273
@ -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)
|
||||
|
@ -0,0 +1 @@
|
||||
pdb's ``--help`` and ``--version`` long options now work.
|
Loading…
Reference in New Issue
Block a user