Ensure client password defaults to empty string
In case the a None value is passed during initialization, this ensures the password defaults to an empty string. This prevents receiving a "'NoneType' object has no attribute 'encode'" when preparing the connection.
This commit is contained in:
@@ -590,7 +590,7 @@ class Connection(object):
|
|||||||
self.host = host
|
self.host = host
|
||||||
self.port = port
|
self.port = port
|
||||||
self.user = user or DEFAULT_USER
|
self.user = user or DEFAULT_USER
|
||||||
self.password = passwd
|
self.password = passwd or ""
|
||||||
self.db = database
|
self.db = database
|
||||||
self.no_delay = no_delay
|
self.no_delay = no_delay
|
||||||
self.unix_socket = unix_socket
|
self.unix_socket = unix_socket
|
||||||
|
|||||||
Reference in New Issue
Block a user