summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream
diff options
context:
space:
mode:
authorJay Farrimond <jay@instaedu.com>2012-07-05 13:30:33 -0700
committerJay Farrimond <jay@instaedu.com>2012-07-05 13:30:33 -0700
commitb210870f48e03a90a22d02b5ab7a3c0c81190fd7 (patch)
treefee9e3d5173eaebd3b46c86ebf83afed852fd702 /sleekxmpp/xmlstream
parent5d6019a962fd1a30ed04520892836cdecc7fe19f (diff)
downloadslixmpp-b210870f48e03a90a22d02b5ab7a3c0c81190fd7.tar.gz
slixmpp-b210870f48e03a90a22d02b5ab7a3c0c81190fd7.tar.bz2
slixmpp-b210870f48e03a90a22d02b5ab7a3c0c81190fd7.tar.xz
slixmpp-b210870f48e03a90a22d02b5ab7a3c0c81190fd7.zip
only log cert errors if not handled by user
Diffstat (limited to 'sleekxmpp/xmlstream')
-rw-r--r--sleekxmpp/xmlstream/xmlstream.py4
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)