diff options
author | Tomeu Vizoso <tomeu.vizoso@collabora.co.uk> | 2010-09-10 07:44:55 (GMT) |
---|---|---|
committer | Tomeu Vizoso <tomeu.vizoso@collabora.co.uk> | 2010-09-10 07:45:06 (GMT) |
commit | a2b8518489cd187d1304df4f05a20b9db7c2cfb4 (patch) | |
tree | 27d61d9fe26f70f5d3da85d1161c9fcf8c19c775 | |
parent | e398f58e92e164c19b44f693381e2d222e0e52ea (diff) |
Don't try to share the activity if we couldn't find a suitable connection #2217
-rw-r--r-- | src/sugar/presence/presenceservice.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sugar/presence/presenceservice.py b/src/sugar/presence/presenceservice.py index 9f51c1a..862d6d0 100644 --- a/src/sugar/presence/presenceservice.py +++ b/src/sugar/presence/presenceservice.py @@ -198,6 +198,12 @@ class PresenceService(gobject.GObject): connection_manager = get_connection_manager() account_path, connection = \ connection_manager.get_preferred_connection() + + if connection is None: + self.emit('activity-shared', False, None, + 'No active connection available') + return + shared_activity = Activity(account_path, connection, properties=properties) self._activity_cache = shared_activity |