]> granicus.if.org Git - python/commitdiff
Merged revisions 76276 via svnmerge from
authorR. David Murray <rdmurray@bitdance.com>
Sun, 15 Nov 2009 00:23:21 +0000 (00:23 +0000)
committerR. David Murray <rdmurray@bitdance.com>
Sun, 15 Nov 2009 00:23:21 +0000 (00:23 +0000)
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.
........

Lib/test/regrtest.py
Misc/NEWS

index a32396505558888b183d2cc30aa675cba3a7e53c..df8a7b0b411ea98aa2227f133faed6603cac1907 100755 (executable)
@@ -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:
index bb1799a56a1085b8eb2628432dd905042af055b1..7f59447d9862d7372284250efc16829107378743 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -378,6 +378,9 @@ Documentation
 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.