changeset 1675:fd143578fe89

plugin XEP-0065: fixed bad error handling
author Goffi <goffi@goffi.org>
date Wed, 25 Nov 2015 13:03:10 +0100
parents 518a42587600
children a0810e0f386e
files src/memory/disco.py src/plugins/plugin_xep_0065.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/memory/disco.py	Wed Nov 25 12:13:03 2015 +0100
+++ b/src/memory/disco.py	Wed Nov 25 13:03:10 2015 +0100
@@ -172,7 +172,7 @@
         @param jid_: the jid of the target server (None for profile's server)
         @param profile: %(doc_profile)s
         @return: a set of found entities
-        @raise CancelError: the request timed out
+        @raise defer.CancelledError: the request timed out
         """
         found_entities = set()
 
--- a/src/plugins/plugin_xep_0065.py	Wed Nov 25 12:13:03 2015 +0100
+++ b/src/plugins/plugin_xep_0065.py	Wed Nov 25 13:03:10 2015 +0100
@@ -760,7 +760,7 @@
             pass
         try:
             proxy = (yield self.host.findServiceEntities('proxy', 'bytestreams', profile=profile)).pop()
-        except (exceptions.CancelError, StopIteration):
+        except (defer.CancelledError, StopIteration):
             notFound(server)
         iq_elt = client.IQ('get')
         iq_elt['to'] = proxy.full()