summaryrefslogtreecommitdiffstats
path: root/Lib/test/regrtest.py
diff options
context:
space:
mode:
authorR. David Murray <rdmurray@bitdance.com>2009-11-15 00:23:21 (GMT)
committerR. David Murray <rdmurray@bitdance.com>2009-11-15 00:23:21 (GMT)
commit35768ad4f5a3dc04194ae806f1e7ededfe13b37c (patch)
tree75992dffa4ee6e503e655162d4e0fac7c7e51230 /Lib/test/regrtest.py
parent18163c3f141353ba307df5a3c2ad3dbd99634cec (diff)
downloadcpython-35768ad4f5a3dc04194ae806f1e7ededfe13b37c.zip
cpython-35768ad4f5a3dc04194ae806f1e7ededfe13b37c.tar.gz
cpython-35768ad4f5a3dc04194ae806f1e7ededfe13b37c.tar.bz2
Merged revisions 76276 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r76276 | r.david.murray | 2009-11-14 19:04:32 -0500 (Sat, 14 Nov 2009) | 3 lines 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-xLib/test/regrtest.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index a323965..df8a7b0 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -370,6 +370,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(("No handler for option {}. Please report this as a bug "
+ "at http://bugs.python.org.").format(o), file=sys.stderr)
+ sys.exit(1)
if single and fromfile:
usage("-s and -f don't go together!")
if use_mp and trace: