mirror of
https://github.com/kennethreitz/records.git
synced 2026-06-05 06:46:17 +00:00
Merge pull request #230 from jogardi/fix/reraise-transaction-exception
Fix transaction context manager to re-raise exceptions after rollback
This commit is contained in:
@@ -343,6 +343,7 @@ class Database(object):
|
||||
tx.commit()
|
||||
except:
|
||||
tx.rollback()
|
||||
raise
|
||||
finally:
|
||||
conn.close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user