diff --git a/NEWS b/NEWS index c5ed1583..2965fdcf 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +* #4238: Handle double BuddyLeft in handle tracking in sugar.presence (morgs) + Snapshot 57402cf309 * Add new keybindings (Ctrl+Q, Ctrl+escape) for close activity (erikos) diff --git a/lib/sugar/activity/activity.py b/lib/sugar/activity/activity.py index 3dc5f301..b4c96841 100644 --- a/lib/sugar/activity/activity.py +++ b/lib/sugar/activity/activity.py @@ -586,7 +586,6 @@ class Activity(Window, gtk.Container): Once the activity is shared, its privacy can be changed by setting its 'private' property. """ - # FIXME: Make private=True to turn on the by-invitation-only scope if self._shared_activity and self._shared_activity.props.joined: raise RuntimeError("Activity %s already shared." % self._activity_id) diff --git a/lib/sugar/presence/activity.py b/lib/sugar/presence/activity.py index c162305e..5ce507d3 100644 --- a/lib/sugar/presence/activity.py +++ b/lib/sugar/presence/activity.py @@ -203,8 +203,9 @@ class Activity(gobject.GObject): def _buddy_left_cb(self, object_path): _logger.debug('%r: buddy %s left', self, object_path) gobject.idle_add(self._emit_buddy_left_signal, object_path) - handle = self._buddy_path_to_handle.pop(object_path) - self._handle_to_buddy_path.pop(handle, None) + handle = self._buddy_path_to_handle.pop(object_path, None) + if handle: + self._handle_to_buddy_path.pop(handle, None) def _emit_new_channel_signal(self, object_path): """Generate new-channel GObject signal with channel object path