diff options
author | Lance Stout <lancestout@gmail.com> | 2012-12-14 09:37:29 -0800 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2012-12-14 09:37:29 -0800 |
commit | 8b29900be459dffcb32a9fc106caebbbf93e5b33 (patch) | |
tree | 49b8f120e33bbeb55b185eda1c2db247ad62dcce | |
parent | def34f0e4296bbba18c243a1ca34c7893763718b (diff) | |
download | slixmpp-8b29900be459dffcb32a9fc106caebbbf93e5b33.tar.gz slixmpp-8b29900be459dffcb32a9fc106caebbbf93e5b33.tar.bz2 slixmpp-8b29900be459dffcb32a9fc106caebbbf93e5b33.tar.xz slixmpp-8b29900be459dffcb32a9fc106caebbbf93e5b33.zip |
Fix some Python3 compatibility issues.
-rw-r--r-- | sleekxmpp/jid.py | 2 | ||||
-rw-r--r-- | sleekxmpp/xmlstream/xmlstream.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sleekxmpp/jid.py b/sleekxmpp/jid.py index 8f1a81d4..bf0c1970 100644 --- a/sleekxmpp/jid.py +++ b/sleekxmpp/jid.py @@ -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 diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index bea6e88f..7955fee5 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -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) |