Have mysql reconnect if disconnected

git-svn-id: https://kippo.googlecode.com/svn/trunk@118 951d7100-d841-11de-b865-b3884708a8e2
This commit is contained in:
desaster 2010-06-09 04:46:50 +00:00
parent dd847cfba7
commit 1b757c8f64
1 changed files with 2 additions and 1 deletions

View File

@ -7,7 +7,8 @@ class DBLogger(dblog.DBLogger):
host = cfg.get('database', 'host'),
db = cfg.get('database', 'database'),
user = cfg.get('database', 'username'),
passwd = cfg.get('database', 'password'))
passwd = cfg.get('database', 'password'),
reconnect = True)
def createSession(self, ip):
sql = 'INSERT INTO `session` (`starttime`, `sensor`, `ip`)' + \