summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/mysql.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/mysql.py b/modules/mysql.py
index 5ae9e93..a690f00 100644
--- a/modules/mysql.py
+++ b/modules/mysql.py
@@ -12,7 +12,11 @@ class Module(ModuleBase):
def _connect(self):
if self.db:
- self.db.close()
+ try:
+ self.db.close()
+ except:
+ pass
+
self.db = MySQLdb.connect(host = self.conf['host'], user = self.conf['user'], passwd = self.conf['passwd'], db = self.conf['db'], use_unicode = True, charset = 'utf8')
def cursor(self):