summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-07-05 13:36:53 -0700
committerLance Stout <lancestout@gmail.com>2012-07-05 13:36:53 -0700
commitc7594b3ef02d490eceb6ae74af976a8f8263539a (patch)
treefee9e3d5173eaebd3b46c86ebf83afed852fd702 /sleekxmpp
parent5d6019a962fd1a30ed04520892836cdecc7fe19f (diff)
parentb210870f48e03a90a22d02b5ab7a3c0c81190fd7 (diff)
downloadslixmpp-c7594b3ef02d490eceb6ae74af976a8f8263539a.tar.gz
slixmpp-c7594b3ef02d490eceb6ae74af976a8f8263539a.tar.bz2
slixmpp-c7594b3ef02d490eceb6ae74af976a8f8263539a.tar.xz
slixmpp-c7594b3ef02d490eceb6ae74af976a8f8263539a.zip
Merge pull request #179 from jay-instaedu/develop
only log cert errors if not handled by user
Diffstat (limited to 'sleekxmpp')
-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)