plugin XEP-0115: trap "service-unavailable" error when retrieving disco infos
This commit is contained in:
parent
cf106bde77
commit
be4fda30dd
1 changed files with 5 additions and 1 deletions
|
|
@ -150,7 +150,11 @@ class XEP_0115_handler(XMPPHandler):
|
||||||
self.host.memory.updateEntityData(from_jid, C.ENTITY_CAP_HASH, c_ver, self.profile)
|
self.host.memory.updateEntityData(from_jid, C.ENTITY_CAP_HASH, c_ver, self.profile)
|
||||||
return
|
return
|
||||||
|
|
||||||
yield self.host.getDiscoInfos(from_jid, self.profile)
|
try:
|
||||||
|
yield self.host.getDiscoInfos(from_jid, self.profile)
|
||||||
|
except Exception, e:
|
||||||
|
log.error(_("Couldn't retrieve disco info for {jid}: {error}").format(jid=from_jid.full(), error=e.condition))
|
||||||
|
return
|
||||||
if c_hash != 'sha-1':
|
if c_hash != 'sha-1':
|
||||||
#unknown hash method
|
#unknown hash method
|
||||||
log.warning(_('Unknown hash method for entity capabilities: [%(hash_method)s] (entity: %(jid)s, node: %(node)s)') % {'hash_method':c_hash, 'jid': from_jid, 'node': c_node})
|
log.warning(_('Unknown hash method for entity capabilities: [%(hash_method)s] (entity: %(jid)s, node: %(node)s)') % {'hash_method':c_hash, 'jid': from_jid, 'node': c_node})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue