Skip to content
Snippets Groups Projects
Commit eefb01e7 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

in service discovery an item can have no name

parent 259983a9
No related branches found
No related tags found
No related merge requests found
......@@ -1562,8 +1562,9 @@ class Service_discovery_window:
if len(model.get_path(iter)) == 1:
expand = True
for item in items:
if not item.has_key('name'):
continue
name = ''
if item.has_key('name'):
name = item['name']
# We look if this item is already in the treeview
iter_child = model.iter_children(iter)
while iter_child:
......@@ -1571,7 +1572,7 @@ class Service_discovery_window:
break
iter_child = model.iter_next(iter_child)
if not iter_child: # If it is not we add it
iter_child = model.append(iter, (item['name'], item['jid']))
iter_child = model.append(iter, (name, item['jid']))
self.agent_infos[item['jid']] = {'identities': [item]}
if self.iter_is_visible(iter_child) or expand:
self.browse(item['jid'])
......
......@@ -458,12 +458,12 @@ class plugin:
array[2], array[3])
def handle_event_agent_info_items(self, account, array):
#('AGENT_INFO', account, (agent, items))
#('AGENT_INFO_ITEMS', account, (agent, items))
if self.windows[account].has_key('browser'):
self.windows[account]['browser'].agent_info_items(array[0], array[1])
def handle_event_agent_info_info(self, account, array):
#('AGENT_INFO', account, (agent, identities, features))
#('AGENT_INFO_INFO', account, (agent, identities, features))
if self.windows[account].has_key('browser'):
self.windows[account]['browser'].agent_info_info(array[0], array[1], \
array[2])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment