Fixed #21509 -- Removed dead exception catching code.

Since Python 2.5, KeyboardInterrupt and SystemExit are not subclasses of
Exception, so explicitly reraising them before the “except Exception” clause
is not necessary anymore.
This commit is contained in:
Krzysztof Jurewicz 2013-11-25 15:39:19 +01:00 committed by Baptiste Mispelon
parent 7349a22d29
commit 7a0a3a64a8
1 changed files with 0 additions and 4 deletions

View File

@ -175,8 +175,6 @@ class SimpleTestCase(unittest.TestCase):
if not skipped:
try:
self._pre_setup()
except (KeyboardInterrupt, SystemExit):
raise
except Exception:
result.addError(self, sys.exc_info())
return
@ -184,8 +182,6 @@ class SimpleTestCase(unittest.TestCase):
if not skipped:
try:
self._post_teardown()
except (KeyboardInterrupt, SystemExit):
raise
except Exception:
result.addError(self, sys.exc_info())
return