[Python-checkins] r76276 - in python/trunk: Lib/test/regrtest.py Misc/NEWS

r.david.murray python-checkins at python.org
Sun Nov 15 01:04:32 CET 2009


Author: r.david.murray
Date: Sun Nov 15 01:04:32 2009
New Revision: 76276

Log:
Issue 7324: add a sanity check to regrtest argument parsing to
catch the case of an option with no handler.


Modified:
   python/trunk/Lib/test/regrtest.py
   python/trunk/Misc/NEWS

Modified: python/trunk/Lib/test/regrtest.py
==============================================================================
--- python/trunk/Lib/test/regrtest.py	(original)
+++ python/trunk/Lib/test/regrtest.py	Sun Nov 15 01:04:32 2009
@@ -344,6 +344,10 @@
             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:

Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Sun Nov 15 01:04:32 2009
@@ -1567,6 +1567,9 @@
 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.
 


More information about the Python-checkins mailing list