]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
In unconditional except clauses, don't catch KeyboardInterrupt -- it's
authorGuido van Rossum <guido@python.org>
Fri, 7 Dec 2001 03:39:34 +0000 (03:39 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 7 Dec 2001 03:39:34 +0000 (03:39 +0000)
commit202dd1ef420359c05814cbfcc5c27e71c90c16d9
treedccbd6b3eef7f95d467647384cc6eb3cc361879b
parenteb4b7bad336481a34b2db01cbea809de726f9698
In unconditional except clauses, don't catch KeyboardInterrupt -- it's
annoying that often you have to hit ^C numerous times before it
works.  The solution: before the "except:" clause, insert "except
KeyboardInterrupt: raise".  This propagates KeyboardInterrupt out,
stopping the test in its tracks.
Lib/unittest.py