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