[Git][gajim/gajim][master] Catch cert error in posh query

Philipp Hörist gitlab at dev.gajim.org
Mon Jul 23 19:51:35 CEST 2018


Philipp Hörist pushed to branch master at gajim / gajim


Commits:
ea34959b by Philipp Hörist at 2018-07-23T19:51:25+02:00
Catch cert error in posh query

- - - - -


1 changed file:

- gajim/common/connection.py


Changes:

=====================================
gajim/common/connection.py
=====================================
--- a/gajim/common/connection.py
+++ b/gajim/common/connection.py
@@ -43,6 +43,7 @@ import hashlib
 import json
 import logging
 import base64
+import ssl
 from functools import partial
 from string import Template
 from urllib.request import urlopen
@@ -1281,7 +1282,7 @@ class Connection(CommonConnection, ConnectionHandlers):
         try:
             file = urlopen(
                 url, cafile=cafile, timeout=2)
-        except URLError as exc:
+        except (URLError, ssl.CertificateError) as exc:
             log.info('Error while requesting POSH: %s' % exc)
             return
 



View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/ea34959b35ed610ac1aa31f0097eb4e2ca076b2b

-- 
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/ea34959b35ed610ac1aa31f0097eb4e2ca076b2b
You're receiving this email because of your account on dev.gajim.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gajim.org/pipermail/commits/attachments/20180723/52d1fed5/attachment.html>


More information about the Commits mailing list