Fix some Python3 compatibility issues.
This commit is contained in:
parent
def34f0e42
commit
8b29900be4
2 changed files with 3 additions and 3 deletions
|
@ -75,7 +75,7 @@ def _cache(key, parts, locked):
|
|||
with JID_CACHE_LOCK:
|
||||
while len(JID_CACHE) > JID_CACHE_MAX_SIZE:
|
||||
found = None
|
||||
for key, item in JID_CACHE.iteritems():
|
||||
for key, item in JID_CACHE.items():
|
||||
if not item[1]: # if not locked
|
||||
found = key
|
||||
break
|
||||
|
|
|
@ -550,7 +550,7 @@ class XMLStream(object):
|
|||
cert.verify(self._expected_server_name, self._der_cert)
|
||||
except cert.CertificateError as err:
|
||||
if not self.event_handled('ssl_invalid_cert'):
|
||||
log.error(err.message)
|
||||
log.error(err)
|
||||
self.disconnect(send_close=False)
|
||||
else:
|
||||
self.event('ssl_invalid_cert',
|
||||
|
@ -859,7 +859,7 @@ class XMLStream(object):
|
|||
cert.verify(self._expected_server_name, self._der_cert)
|
||||
except cert.CertificateError as err:
|
||||
if not self.event_handled('ssl_invalid_cert'):
|
||||
log.error(err.message)
|
||||
log.error(err)
|
||||
self.disconnect(self.auto_reconnect, send_close=False)
|
||||
else:
|
||||
self.event('ssl_invalid_cert', pem_cert, direct=True)
|
||||
|
|
Loading…
Reference in a new issue