Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.co.uk>2010-07-13 11:57:03 (GMT)
committer Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>2010-08-20 13:33:53 (GMT)
commitaf6e3aa5ef284ed9184f149b119707496747f3a5 (patch)
treed11209ef1df081e94d385f4dfc56dabf36433dc6
parent46159e987b8bf20f57ce1e8fca78338fc90508cf (diff)
Restore use of ActivityProperties.GetActivity
-rw-r--r--src/sugar/presence/presenceservice.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/sugar/presence/presenceservice.py b/src/sugar/presence/presenceservice.py
index 6b42290..d0e20dc 100644
--- a/src/sugar/presence/presenceservice.py
+++ b/src/sugar/presence/presenceservice.py
@@ -267,13 +267,16 @@ class PresenceService(gobject.GObject):
connection_manager = get_connection_manager()
connections_per_account = connection_manager.get_connections_per_account()
for account_path, connection in connections_per_account.items():
- room_handles = connection.RequestHandles(HANDLE_TYPE_ROOM,
- [activity_id],
- dbus_interface=CONNECTION)
- activity = Activity(account_path, connection,
- room_handle=room_handles[0])
- self._activity_cache = activity
- return activity
+ try:
+ room_handle = connection.GetActivity(activity_id)
+ except dbus.exceptions.DBusException, e:
+ if e.get_dbus_name() != 'org.freedesktop.Telepathy.Error.NotAvailable':
+ raise
+ else:
+ activity = Activity(account_path, connection,
+ room_handle=room_handle)
+ self._activity_cache = activity
+ return activity
return None