Bugfix: list index out of range when opening service discovery
Fixes #9301
This commit is contained in:
parent
7a8892f021
commit
9a2d915d5d
|
@ -1569,11 +1569,14 @@ class ToplevelAgentBrowser(AgentBrowser):
|
||||||
|
|
||||||
def _update_info(self, iter_, jid, node, identities, features, data):
|
def _update_info(self, iter_, jid, node, identities, features, data):
|
||||||
addr = get_agent_address(jid, node)
|
addr = get_agent_address(jid, node)
|
||||||
name = identities[0].get('name', '')
|
if not identities:
|
||||||
if name:
|
|
||||||
descr = "<b>%s</b>\n%s" % (name, addr)
|
|
||||||
else:
|
|
||||||
descr = "<b>%s</b>" % addr
|
descr = "<b>%s</b>" % addr
|
||||||
|
else:
|
||||||
|
name = identities[0].get('name', '')
|
||||||
|
if name:
|
||||||
|
descr = "<b>%s</b>\n%s" % (name, addr)
|
||||||
|
else:
|
||||||
|
descr = "<b>%s</b>" % addr
|
||||||
|
|
||||||
# Update progress
|
# Update progress
|
||||||
self._progress += 1
|
self._progress += 1
|
||||||
|
|
Loading…
Reference in New Issue