Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Malcolm Tredinnick authored June 30, 2008

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. 5  django/db/transaction.py
5  django/db/transaction.py
@@ -196,7 +196,10 @@ def _commit_on_success(*args, **kw):
196 196
             managed(True)
197 197
             try:
198 198
                 res = func(*args, **kw)
199  
-            except Exception, e:
  199
+            except (Exception, KeyboardInterrupt, SystemExit):
  200
+                # (We handle KeyboardInterrupt and SystemExit specially, since
  201
+                # they don't inherit from Exception in Python 2.5, but we
  202
+                # should treat them uniformly here.)
200 203
                 if is_dirty():
201 204
                     rollback()
202 205
                 raise

0 notes on commit 52b6857

Please sign in to comment.
Something went wrong with that request. Please try again.