Commit 362af992 authored by pengxiong's avatar pengxiong

数据库回滚错误捕捉

parent e12d9142
...@@ -108,6 +108,9 @@ class TAMP_SQL(object): ...@@ -108,6 +108,9 @@ class TAMP_SQL(object):
try: try:
self.session.commit() self.session.commit()
except: except:
self.session.rollback() try:
self.session.rollback()
except:
pass
finally: finally:
self.session.close() self.session.close()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment