[server] fix TypeErrors
With multisource gone, cnxset.reconnect() doesn't take a source
argument. Broken since d62e13eba033.
--- a/server/session.py Tue Dec 17 11:50:46 2013 +0100
+++ b/server/session.py Wed Jan 29 13:45:03 2014 +0100
@@ -1170,7 +1170,7 @@
if not rollback_on_failure:
raise
source.warning("trying to reconnect")
- self.cnxset.reconnect(source)
+ self.cnxset.reconnect()
return source.doexec(self, sql, args, rollback=rollback_on_failure)
@_open_only
--- a/server/sources/native.py Tue Dec 17 11:50:46 2013 +0100
+++ b/server/sources/native.py Wed Jan 29 13:45:03 2014 +0100
@@ -484,13 +484,13 @@
raise
# FIXME: better detection of deconnection pb
self.warning("trying to reconnect")
- session.cnxset.reconnect(self)
+ session.cnxset.reconnect()
cursor = self.doexec(session, sql, args)
except self.DbapiError as exc:
# We get this one with pyodbc and SQL Server when connection was reset
if exc.args[0] == '08S01' and session.mode != 'write':
self.warning("trying to reconnect")
- session.cnxset.reconnect(self)
+ session.cnxset.reconnect()
cursor = self.doexec(session, sql, args)
else:
raise
@@ -755,7 +755,7 @@
except (self.OperationalError, self.InterfaceError):
if session.mode == 'read' and _retry:
self.warning("trying to reconnect (eid_type_source())")
- session.cnxset.reconnect(self)
+ session.cnxset.reconnect()
return self._eid_type_source(session, eid, sql, _retry=False)
except Exception:
assert session.cnxset, 'session has no connections set'