From dfc0a4feab2671f75b4949c0cf02a979cb487414 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 9 Mar 2010 22:37:57 +0100 Subject: [PATCH] don't traceback when we try to draw an account that is not contacts._accounts. Fixes #5640 --- src/gtkgui_helpers.py | 3 ++- src/roster_window.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gtkgui_helpers.py b/src/gtkgui_helpers.py index 065107c21..f11536cf4 100644 --- a/src/gtkgui_helpers.py +++ b/src/gtkgui_helpers.py @@ -627,7 +627,8 @@ def get_avatar_pixbuf_from_cache(fjid, use_local=True): # don't show avatar for the transport itself return None - if any(jid in gajim.contacts.get_gc_list(acc) for acc in gajim.connections): + if any(jid in gajim.contacts.get_gc_list(acc) for acc in \ + gajim.contacts.get_accounts()): is_groupchat_contact = True else: is_groupchat_contact = False diff --git a/src/roster_window.py b/src/roster_window.py index 0c4477186..9f0d61de5 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -1398,7 +1398,7 @@ class RosterWindow: self.on_modelfilter_row_has_child_toggled) self.tree.set_model(self.modelfilter) - for acct in gajim.connections: + for acct in gajim.contacts.get_accounts(): self.add_account(acct) self.add_account_contacts(acct) # Recalculate column width for ellipsizing