Commit da82689d authored by R. David Murray's avatar R. David Murray

Issue 7324: add a sanity check to regrtest argument parsing to

catch the case of an option with no handler.
parent ca020bb7
...@@ -344,6 +344,10 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, ...@@ -344,6 +344,10 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
print # Force a newline (just in case) print # Force a newline (just in case)
print json.dumps(result) print json.dumps(result)
sys.exit(0) sys.exit(0)
else:
print >>sys.stderr, ("No handler for option {}. Please "
"report this as a bug at http://bugs.python.org.").format(o)
sys.exit(1)
if single and fromfile: if single and fromfile:
usage(2, "-s and -f don't go together!") usage(2, "-s and -f don't go together!")
if use_mp and trace: if use_mp and trace:
......
...@@ -1567,6 +1567,9 @@ Extension Modules ...@@ -1567,6 +1567,9 @@ Extension Modules
Tests Tests
----- -----
- Issue #7324: add a sanity check to regrtest argument parsing to
catch the case of an option with no handler.
- Issue #7312: Add a -F flag to run the selected tests in a loop until - Issue #7312: Add a -F flag to run the selected tests in a loop until
a test fails. Can be combined with -j. a test fails. Can be combined with -j.
......
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