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
diff --git a/Lib/pdb.py b/Lib/pdb.py
index 8c1c961..8639204 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -1660,7 +1660,7 @@
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)