mirror of
https://github.com/django/django.git
synced 2025-09-26 20:19:16 +00:00
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
1 changed files with 0 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue