#4: UTF-8 encode passwd only when set
This commit is contained in:
parent
6c43653950
commit
0e1da6275b
|
@ -139,7 +139,8 @@ class ConnectionManager(object):
|
|||
return len(self._pool)
|
||||
|
||||
def _match(self, bind, passwd):
|
||||
passwd = passwd.encode('utf8')
|
||||
if passwd is not None:
|
||||
passwd = passwd.encode('utf8')
|
||||
with self._pool_lock:
|
||||
inactives = []
|
||||
|
||||
|
@ -200,7 +201,8 @@ class ConnectionManager(object):
|
|||
"""
|
||||
tries = 0
|
||||
connected = False
|
||||
passwd = passwd.encode('utf8')
|
||||
if passwd is not None:
|
||||
passwd = passwd.encode('utf8')
|
||||
exc = None
|
||||
|
||||
# trying retry_max times in a row with a fresh connector
|
||||
|
|
Loading…
Reference in New Issue