diff options
author | Jay Farrimond <jay@instaedu.com> | 2012-07-05 13:30:33 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2012-07-05 13:38:26 -0700 |
commit | 88b5e60807d5e07e4da1a07042d3b66fe9e98701 (patch) | |
tree | 9cf90b942352e254e4bd4df2b3e61301448b8071 /sleekxmpp/xmlstream/xmlstream.py | |
parent | a26a8bd79cc24d29ca3cff0640d8b831f8c84bd3 (diff) | |
download | slixmpp-88b5e60807d5e07e4da1a07042d3b66fe9e98701.tar.gz slixmpp-88b5e60807d5e07e4da1a07042d3b66fe9e98701.tar.bz2 slixmpp-88b5e60807d5e07e4da1a07042d3b66fe9e98701.tar.xz slixmpp-88b5e60807d5e07e4da1a07042d3b66fe9e98701.zip |
only log cert errors if not handled by user
Diffstat (limited to 'sleekxmpp/xmlstream/xmlstream.py')
-rw-r--r-- | sleekxmpp/xmlstream/xmlstream.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index 321e2694..3baa5b80 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -537,8 +537,8 @@ class XMLStream(object): try: cert.verify(self._expected_server_name, self._der_cert) except cert.CertificateError as err: - log.error(err.message) if not self.event_handled('ssl_invalid_cert'): + log.error(err.message) self.disconnect(send_close=False) else: self.event('ssl_invalid_cert', @@ -828,8 +828,8 @@ class XMLStream(object): try: cert.verify(self._expected_server_name, self._der_cert) except cert.CertificateError as err: - log.error(err.message) if not self.event_handled('ssl_invalid_cert'): + log.error(err.message) self.disconnect(self.auto_reconnect, send_close=False) else: self.event('ssl_invalid_cert', pem_cert, direct=True) |