forked from brmlab/brmbar-github
Rollback on generic database exceptions.
This commit is contained in:
parent
f8a265f1d2
commit
5d658a7406
1 changed files with 1 additions and 0 deletions
|
@ -59,6 +59,7 @@ class Database:
|
||||||
return self._execute(cur, query, attrs, level+1)
|
return self._execute(cur, query, attrs, level+1)
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
logger.debug("_execute exception: %s", ex)
|
logger.debug("_execute exception: %s", ex)
|
||||||
|
self.db_conn.rollback()
|
||||||
|
|
||||||
def commit(self):
|
def commit(self):
|
||||||
"""passes commit to db"""
|
"""passes commit to db"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue