Commit 7aba2e75 authored by Vincent Pelletier's avatar Vincent Pelletier

Fix MySQL server auto-reconnect.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1937 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 0aac3db1
...@@ -112,7 +112,7 @@ class MySQLDatabaseManager(DatabaseManager): ...@@ -112,7 +112,7 @@ class MySQLDatabaseManager(DatabaseManager):
except OperationalError, m: except OperationalError, m:
if m[0] in (SERVER_GONE_ERROR, SERVER_LOST): if m[0] in (SERVER_GONE_ERROR, SERVER_LOST):
logging.info('the MySQL server is gone; reconnecting') logging.info('the MySQL server is gone; reconnecting')
self.connect() self._connect()
return self.query(query) return self.query(query)
raise DatabaseFailure('MySQL error %d: %s' % (m[0], m[1])) raise DatabaseFailure('MySQL error %d: %s' % (m[0], m[1]))
return r return r
......
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