Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits: 849176b1 by Philipp Hörist at 2018-05-28T07:40:05+02:00 Move readlines() into try/except block
Fixes #52 - - - - -
1 changed file:
- nbxmpp/tls_nb.py
Changes:
===================================== nbxmpp/tls_nb.py ===================================== --- a/nbxmpp/tls_nb.py +++ b/nbxmpp/tls_nb.py @@ -342,11 +342,12 @@ class NonBlockingTLS(PlugIn): f = open(cert_path, encoding='utf-8') else: f = io.open(cert_path, encoding='utf-8') + lines = f.readlines() except (IOError, UnicodeError) as e: log.warning('Unable to open certificate file %s: %s' % \ (cert_path, str(e))) return - lines = f.readlines() + i = 0 begin = -1 for line in lines:
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/849176b1a149c6739b5da4dbdae...
--- View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/849176b1a149c6739b5da4dbdae... You're receiving this email because of your account on dev.gajim.org.