From 9a2d915d5d8745ae050477c9e4d15eb6496d597e Mon Sep 17 00:00:00 2001 From: pitchum Date: Sun, 2 Sep 2018 22:18:42 +0200 Subject: [PATCH] Bugfix: list index out of range when opening service discovery Fixes #9301 --- gajim/disco.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gajim/disco.py b/gajim/disco.py index bf3f09d99..9046ccf94 100644 --- a/gajim/disco.py +++ b/gajim/disco.py @@ -1569,11 +1569,14 @@ class ToplevelAgentBrowser(AgentBrowser): def _update_info(self, iter_, jid, node, identities, features, data): addr = get_agent_address(jid, node) - name = identities[0].get('name', '') - if name: - descr = "%s\n%s" % (name, addr) - else: + if not identities: descr = "%s" % addr + else: + name = identities[0].get('name', '') + if name: + descr = "%s\n%s" % (name, addr) + else: + descr = "%s" % addr # Update progress self._progress += 1