summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/db/transaction.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/django/db/transaction.py b/django/db/transaction.py
index c0c3779f6a..cd27cf6044 100644
--- a/django/db/transaction.py
+++ b/django/db/transaction.py
@@ -196,7 +196,10 @@ def commit_on_success(func):
managed(True)
try:
res = func(*args, **kw)
- except Exception, e:
+ except (Exception, KeyboardInterrupt, SystemExit):
+ # (We handle KeyboardInterrupt and SystemExit specially, since
+ # they don't inherit from Exception in Python 2.5, but we
+ # should treat them uniformly here.)
if is_dirty():
rollback()
raise