Django

Code

Changeset 7802

Show
Ignore:
Timestamp:
06/30/08 06:56:52 (2 months ago)
Author:
mtredinnick
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/db/transaction.py

    r7558 r7802  
    197197            try: 
    198198                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.) 
    200203                if is_dirty(): 
    201204                    rollback()