Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #6928 -- Added a little more robustness to transaction rollback…

…s for Python 2.5. Patch from guettli.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7802 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 52b6857f93805f37cf69769d9d9d8242001c8ec9 1 parent 5f7bb13
@malcolmt malcolmt authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 django/db/transaction.py
View
5 django/db/transaction.py
@@ -196,7 +196,10 @@ def _commit_on_success(*args, **kw):
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
Please sign in to comment.
Something went wrong with that request. Please try again.