Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
-
abfe8658
by Philipp Hörist at 2017-12-27T19:57:28+01:00
1 changed file:
Changes:
| ... | ... | @@ -494,13 +494,13 @@ class NonBlockingTLS(PlugIn): |
| 494 | 494 |
def _ssl_verify_callback(self, sslconn, cert, errnum, depth, ok):
|
| 495 | 495 |
# Exceptions can't propagate up through this callback, so print them here.
|
| 496 | 496 |
try:
|
| 497 |
+ if not self._owner.ssl_errnum:
|
|
| 498 |
+ self._owner.ssl_errnum = errnum
|
|
| 497 | 499 |
if depth == 0:
|
| 498 | 500 |
self._owner.ssl_certificate = cert
|
| 499 |
- if not ok:
|
|
| 500 |
- self._owner.ssl_errnum = errnum
|
|
| 501 | 501 |
return True
|
| 502 |
- except:
|
|
| 503 |
- log.error("Exception caught in _ssl_info_callback:", exc_info=True)
|
|
| 502 |
+ except Exception:
|
|
| 503 |
+ log.exception("Exception caught in _ssl_info_callback:")
|
|
| 504 | 504 |
# Make sure something is printed, even if log is disabled.
|
| 505 | 505 |
traceback.print_exc()
|
| 506 | 506 |
|