Mercurial > libervia-backend
comparison src/plugins/plugin_xep_0065.py @ 1742:244a605623d6
complete the Exception's list when catching JID error:
- Twisted JID constructor raises not only jid.InvalidFormat but also RuntimeError and AttributeError
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 15 Dec 2015 13:30:47 +0100 |
parents | fd143578fe89 |
children | abd6d6f89006 |
comparison
equal
deleted
inserted
replaced
1741:cc31dd72526d | 1742:244a605623d6 |
---|---|
780 jid_ = streamhost_elt['jid'] | 780 jid_ = streamhost_elt['jid'] |
781 port = streamhost_elt['port'] | 781 port = streamhost_elt['port'] |
782 if not all((host, jid, port)): | 782 if not all((host, jid, port)): |
783 raise KeyError | 783 raise KeyError |
784 jid_ = jid.JID(jid_) | 784 jid_ = jid.JID(jid_) |
785 except (StopIteration, KeyError, RuntimeError, jid.InvalidFormat): | 785 except (StopIteration, KeyError, RuntimeError, jid.InvalidFormat, AttributeError): |
786 log.warning(u"Invalid proxy data received from {}".format(proxy.full())) | 786 log.warning(u"Invalid proxy data received from {}".format(proxy.full())) |
787 notFound(server) | 787 notFound(server) |
788 | 788 |
789 proxy_infos = self._cache_proxies[server] = ProxyInfos(host, jid_, port) | 789 proxy_infos = self._cache_proxies[server] = ProxyInfos(host, jid_, port) |
790 log.info(u"Proxy found: {}".format(proxy_infos)) | 790 log.info(u"Proxy found: {}".format(proxy_infos)) |