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-08-12 13:04:34 (GMT)
committer Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>2010-08-20 13:33:53 (GMT)
commitd5dbe3616f2cf27e33b7ffdfa258f1719022e189 (patch)
treec9b80b617e417dc07b971f44df4f33e12175b23e
parentc0ed611aeeb4a8a6f0c02222881b19235800fb35 (diff)
Correctly use the connections from ConnectionManager
-rw-r--r--src/sugar/presence/presenceservice.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sugar/presence/presenceservice.py b/src/sugar/presence/presenceservice.py
index 1eb5fa6..1ad9272 100644
--- a/src/sugar/presence/presenceservice.py
+++ b/src/sugar/presence/presenceservice.py
@@ -1,4 +1,5 @@
# Copyright (C) 2007, Red Hat, Inc.
+# Copyright (C) 2010 Collabora Ltd. <http://www.collabora.co.uk/>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -267,16 +268,18 @@ 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():
+ if not connection.connected:
+ continue
logging.debug("Calling GetActivity on %s", account_path)
try:
- room_handle = connection.GetActivity(activity_id)
+ room_handle = connection.connection.GetActivity(activity_id)
except dbus.exceptions.DBusException, e:
if e.get_dbus_name() == 'org.freedesktop.Telepathy.Error.NotAvailable':
logging.debug("There's no shared activity with the id %s", activity_id)
else:
raise
else:
- activity = Activity(account_path, connection,
+ activity = Activity(account_path, connection.connection,
room_handle=room_handle)
self._activity_cache = activity
return activity