mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-11 09:03:40 +02:00
2019-12-23 Fred Gleason <fredg@paravelsystems.com>
* Added a work-around in the 'PyPAD.Receiver().__openDb()' method to work with versions of MySQLdb that do not support the 'password=' parameter in 'MySQLdb.connect()'.
This commit is contained in:
@@ -797,9 +797,14 @@ class Receiver(object):
|
||||
|
||||
def __openDb(self):
|
||||
creds=self.__getDbCredentials()
|
||||
return MySQLdb.connect(user=creds[0],password=creds[1],
|
||||
host=creds[2],database=creds[3],
|
||||
charset='utf8mb4')
|
||||
try:
|
||||
return MySQLdb.connect(user=creds[0],passwd=creds[1],
|
||||
host=creds[2],database=creds[3],
|
||||
charset='utf8mb4')
|
||||
except TypeError:
|
||||
return MySQLdb.connect(user=creds[0],password=creds[1],
|
||||
host=creds[2],database=creds[3],
|
||||
charset='utf8mb4')
|
||||
|
||||
def setPadCallback(self,callback):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user