diff --git a/pisi/context.py b/pisi/context.py index 520d8036..4a9e2c0d 100644 --- a/pisi/context.py +++ b/pisi/context.py @@ -63,6 +63,9 @@ def txn_proc(proc, txn = None): except db.DBError, e: autotxn.abort() raise e + except Exception, e: + autotxn.abort() + raise e autotxn.commit() else: retval = proc(None) diff --git a/pisi/dbshelve.py b/pisi/dbshelve.py index 0adfe8e7..0dacfd94 100644 --- a/pisi/dbshelve.py +++ b/pisi/dbshelve.py @@ -81,6 +81,9 @@ class DBShelf: except db.DBError, e: autotxn.abort() raise e + except Exception, e: + autotxn.abort() + raise e autotxn.commit() else: # execute without transactions retval = proc(None)