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:
Fred Gleason 2019-12-23 12:53:19 -05:00
parent cd6da31603
commit e3dd3ef7a3
2 changed files with 12 additions and 3 deletions

View File

@ -19371,3 +19371,7 @@
2019-12-20 Fred Gleason <fredg@paravelsystems.com>
* Added a debugging message to the 'LocalAudio::pollData()' method
in ripcd(8).
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()'.

View File

@ -797,6 +797,11 @@ class Receiver(object):
def __openDb(self):
creds=self.__getDbCredentials()
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')