[Zope3-checkins]
SVN: zope.testing/branches/mgedmin-fixes/src/zope/testing/testrunner.py
Do not catch KeyboardInterrupt with bare excepts;
that's very user-unfriendly.
Marius Gedminas
marius at pov.lt
Thu Jan 11 19:56:28 EST 2007
Log message for revision 71952:
Do not catch KeyboardInterrupt with bare excepts; that's very user-unfriendly.
Changed:
U zope.testing/branches/mgedmin-fixes/src/zope/testing/testrunner.py
-=-
Modified: zope.testing/branches/mgedmin-fixes/src/zope/testing/testrunner.py
===================================================================
--- zope.testing/branches/mgedmin-fixes/src/zope/testing/testrunner.py 2007-01-12 00:44:36 UTC (rev 71951)
+++ zope.testing/branches/mgedmin-fixes/src/zope/testing/testrunner.py 2007-01-12 00:56:28 UTC (rev 71952)
@@ -519,6 +519,8 @@
try:
try:
test.debug()
+ except KeyboardInterrupt:
+ raise
except:
result.addError(
test,
@@ -638,6 +640,8 @@
line = suberr.readline()
try:
ran, nfail, nerr = map(int, line.strip().split())
+ except KeyboardInterrupt:
+ raise
except:
raise SubprocessError(line+suberr.read())
@@ -1103,6 +1107,8 @@
try:
module = import_name(module_name)
+ except KeyboardInterrupt:
+ raise
except:
suite = StartUpFailure(
options, module_name,
@@ -1119,6 +1125,8 @@
"Invalid test_suite, %r, in %s"
% (suite, module_name)
)
+ except KeyboardInterrupt:
+ raise
except:
suite = StartUpFailure(
options, module_name, sys.exc_info()[:2]+(None,))
More information about the Zope3-Checkins
mailing list