diff options
| author | R. David Murray <rdmurray@bitdance.com> | 2009-11-15 00:04:32 (GMT) |
|---|---|---|
| committer | R. David Murray <rdmurray@bitdance.com> | 2009-11-15 00:04:32 (GMT) |
| commit | da82689daa858ca8d89179db2480f7d57d914aed (patch) | |
| tree | 4695b63ba2dec823b9785c57aa2bd4ed7515b5ff /Lib/test/regrtest.py | |
| parent | ca020bb7a76ad045e3165eeaa76845669fe5c4a8 (diff) | |
| download | cpython-da82689daa858ca8d89179db2480f7d57d914aed.zip cpython-da82689daa858ca8d89179db2480f7d57d914aed.tar.gz cpython-da82689daa858ca8d89179db2480f7d57d914aed.tar.bz2 | |
Issue 7324: add a sanity check to regrtest argument parsing to
catch the case of an option with no handler.
Diffstat (limited to 'Lib/test/regrtest.py')
| -rwxr-xr-x | Lib/test/regrtest.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 7785f37..2a3f92a 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: |
