[session] when rollback_on_failure is false, we should not try to reconnect if the sql raised an error stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 21 Jun 2010 08:52:13 +0200
branchstable
changeset 5802 159b6a712d9d
parent 5801 355d3945c1f3
child 5803 589e2e3fb997
[session] when rollback_on_failure is false, we should not try to reconnect if the sql raised an error
server/session.py
--- a/server/session.py	Sun Jun 20 15:09:42 2010 +0000
+++ b/server/session.py	Mon Jun 21 08:52:13 2010 +0200
@@ -283,6 +283,8 @@
         try:
             return source.doexec(self, sql, args, rollback=rollback_on_failure)
         except (source.OperationalError, source.InterfaceError):
+            if not rollback_on_failure:
+                raise
             source.warning("trying to reconnect")
             self.pool.reconnect(source)
             return source.doexec(self, sql, args, rollback=rollback_on_failure)