From 1659332c81ffaaf660852837c031c0da65ac1cf9 Mon Sep 17 00:00:00 2001 From: Morgan Collett Date: Thu, 10 Jul 2008 15:20:50 +0200 Subject: [PATCH] #7444 Fix crash in get_joined_buddies when a buddy disappears uncleanly --- src/sugar/presence/activity.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/sugar/presence/activity.py b/src/sugar/presence/activity.py index ad21158f..6f221bbe 100644 --- a/src/sugar/presence/activity.py +++ b/src/sugar/presence/activity.py @@ -235,12 +235,18 @@ class Activity(gobject.GObject): def get_joined_buddies(self): """Retrieve the set of Buddy objects attached to this activity - returns list of presence Buddy objects + returns list of presence Buddy objects that we can successfully + create from the buddy object paths that PS has for this activity. """ resp = self._activity.GetJoinedBuddies() buddies = [] for item in resp: - buddies.append(self._ps_new_object(item)) + try: + buddies.append(self._ps_new_object(item)) + except dbus.DBusException: + _logger.debug( + 'get_joined_buddies failed to get buddy object for %r', + item) return buddies def get_buddy_by_handle(self, handle):