#7444 Fix crash in get_joined_buddies when a buddy disappears uncleanly

This commit is contained in:
Morgan Collett 2008-07-10 15:20:50 +02:00
parent 92ef9d298a
commit 1659332c81

View File

@ -235,12 +235,18 @@ class Activity(gobject.GObject):
def get_joined_buddies(self): def get_joined_buddies(self):
"""Retrieve the set of Buddy objects attached to this activity """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() resp = self._activity.GetJoinedBuddies()
buddies = [] buddies = []
for item in resp: for item in resp:
try:
buddies.append(self._ps_new_object(item)) 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 return buddies
def get_buddy_by_handle(self, handle): def get_buddy_by_handle(self, handle):