plugin XEP-0065: fixed bad error handling

This commit is contained in:
Goffi 2015-11-25 13:03:10 +01:00
commit 5afdf1c1ca
2 changed files with 2 additions and 2 deletions

View file

@ -172,7 +172,7 @@ class Discovery(object):
@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()

View file

@ -760,7 +760,7 @@ class XEP_0065(object):
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()