From: R. David Murray Date: Sun, 15 Nov 2009 00:04:32 +0000 (+0000) Subject: Issue 7324: add a sanity check to regrtest argument parsing to X-Git-Tag: v2.7a1~108 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da82689daa858ca8d89179db2480f7d57d914aed;p=thirdparty%2FPython%2Fcpython.git Issue 7324: add a sanity check to regrtest argument parsing to catch the case of an option with no handler. --- diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 7785f37ebcbd..2a3f92a30ffd 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -344,6 +344,10 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, print # Force a newline (just in case) print json.dumps(result) 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: usage(2, "-s and -f don't go together!") if use_mp and trace: diff --git a/Misc/NEWS b/Misc/NEWS index 4e2b131bfdea..afa286de6efd 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -1567,6 +1567,9 @@ Extension Modules 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 a test fails. Can be combined with -j.