diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-09-10 11:02:24 (GMT) |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-09-10 11:02:24 (GMT) |
commit | 83ed100ec618a10d05de4112b69c22ad90cc2df7 (patch) | |
tree | ee16e1707a99aa2c4df04d6156e424deed8faf14 | |
parent | bdcafb8afb87ef8710b2ef0ee1b9173b3f8fe955 (diff) |
Raise error if we try to join a non-local activity without knowing what its room is
-rw-r--r-- | src/activity.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/activity.py b/src/activity.py index 26cd561..5ae2520 100644 --- a/src/activity.py +++ b/src/activity.py @@ -911,17 +911,20 @@ class Activity(ExportedGObject): self._private = private if self._room: - # we're probably sharing a local activity. - # FIXME: assert that this is the case? - # (try this:) assert self._local + # we already know what the room is => we must be joining someone + # else's activity? self._join_activity_got_handles_cb((self._room,)) - else: + elif self._local: + # we need to create a room conn = self._tp.get_connection() conn[CONN_INTERFACE].RequestHandles(HANDLE_TYPE_ROOM, [self._tp.suggest_room_for_activity(self._id)], reply_handler=self._join_activity_got_handles_cb, error_handler=self._join_failed_cb) + else: + async_err_cb(RuntimeError("Don't know what room to join for " + "non-local activity %s" % self._id)) _logger.debug("triggered share/join attempt on activity %s", self._id) |