mirror of https://github.com/django/django.git
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:
parent
7349a22d29
commit
7a0a3a64a8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue