Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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.
  • Loading branch information...
commit 7a0a3a64a827480c737060bcd5af9af25c3b3c15 1 parent 7349a22
@KrzysiekJ KrzysiekJ authored bmispelon committed
Showing with 0 additions and 4 deletions.
  1. +0 −4 django/test/testcases.py
View
4 django/test/testcases.py
@@ -175,8 +175,6 @@ def __call__(self, result=None):
if not skipped:
try:
self._pre_setup()
- except (KeyboardInterrupt, SystemExit):
- raise
except Exception:
result.addError(self, sys.exc_info())
return
@@ -184,8 +182,6 @@ def __call__(self, result=None):
if not skipped:
try:
self._post_teardown()
- except (KeyboardInterrupt, SystemExit):
- raise
except Exception:
result.addError(self, sys.exc_info())
return
Please sign in to comment.
Something went wrong with that request. Please try again.