Update mysqlDb.py

This commit is contained in:
midoks
2021-05-10 00:10:10 +08:00
parent 1d4be9846d
commit ad073153c2
+1 -1
View File
@@ -38,7 +38,7 @@ class mysqlDb:
try:
self.__DB_CONN = MySQLdb.connect(host=self.__DB_HOST, user=self.__DB_USER, passwd=self.__DB_PASS,
port=self.__DB_PORT, charset="utf8", connect_timeout=1, unix_socket=socket)
except MySQLdb.Error, e:
except MySQLdb.Error as e:
self.__DB_HOST = '127.0.0.1'
self.__DB_CONN = MySQLdb.connect(host=self.__DB_HOST, user=self.__DB_USER, passwd=self.__DB_PASS,
port=self.__DB_PORT, charset="utf8", connect_timeout=1, unix_socket=socket)