[Zope-Checkins] CVS: Zope/utilities - testrunner.py:1.31
Guido van Rossum
guido@python.org
Fri, 22 Nov 2002 07:56:06 -0500
Update of /cvs-repository/Zope/utilities
In directory cvs.zope.org:/tmp/cvs-serv29043
Modified Files:
testrunner.py
Log Message:
Exclude KeyboardInterrupt from unqualified except: clauses.
=== Zope/utilities/testrunner.py 1.30 => 1.31 ===
--- Zope/utilities/testrunner.py:1.30 Fri Nov 22 07:54:44 2002
+++ Zope/utilities/testrunner.py Fri Nov 22 07:56:05 2002
@@ -58,6 +58,8 @@
sys.path.append(path) # let module find things in its dir
try:
module=imp.load_module(name, file, pathname, desc)
+ except KeyboardInterrupt:
+ raise
except:
(tb_t, tb_v, tb_tb) = sys.exc_info()
self.report("Module %s failed to load\n%s: %s" % (pathname,
@@ -146,6 +148,8 @@
os.chdir(dirname)
try:
suite = self.getSuiteFromFile(name)
+ except KeyboardInterrupt:
+ raise
except:
self.report('No test suite found in file:\n%s\n' % pathname)
if self.verbosity > 1:
@@ -186,7 +190,10 @@
sys.stderr.write( '*** Changing directory to: %s\n' % dirname )
os.chdir(dirname)
self.report('Running: %s' % filename)
- try: suite=self.getSuiteFromFile(name)
+ try:
+ suite=self.getSuiteFromFile(name)
+ except KeyboardInterrupt:
+ raise
except:
traceback.print_exc()
suite=None