Skip to content
This repository has been archived by the owner on Sep 24, 2022. It is now read-only.

Commit

Permalink
Don't try to rollback if connection was closed
Browse files Browse the repository at this point in the history
  • Loading branch information
haizaar committed Aug 26, 2015
1 parent 5e83907 commit 78175bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions momoko/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,10 +821,10 @@ def exec_statements(future):
cursor = future.result()
cursors.append(cursor)
except Exception as error:
if not auto_rollback:
transaction_future.set_exc_info(sys.exc_info())
else:
if auto_rollback and not self.closed:
self._rollback(transaction_future, error)
else:
transaction_future.set_exc_info(sys.exc_info())
return

try:
Expand Down

0 comments on commit 78175bc

Please sign in to comment.