Commit 52b6857f authored by Malcolm Tredinnick's avatar Malcolm Tredinnick
Browse files

Fixed #6928 -- Added a little more robustness to transaction rollbacks for...

Fixed #6928 -- Added a little more robustness to transaction rollbacks for Python 2.5. Patch from guettli.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7802 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 5f7bb13f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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