diff options
author | Simon Schampijer <simon@schampijer.de> | 2007-08-31 10:52:50 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@schampijer.de> | 2007-08-31 10:52:50 (GMT) |
commit | f9e10f8d2d973088056da988c2e9818cd0c77ea3 (patch) | |
tree | bdd4d3e20bd2cda6a031f08f1a0bc1e143b68ec5 /activity.py | |
parent | 36dd7e1b5afff032b9a1c1b358b9c4e835ef1ffc (diff) |
Only try to connect to presence service when offline.
Fix for #3099
Diffstat (limited to 'activity.py')
-rwxr-xr-x | activity.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/activity.py b/activity.py index 33cefe8..325b238 100755 --- a/activity.py +++ b/activity.py @@ -101,10 +101,13 @@ class MemorizeActivity(Activity): # Get the Presence Service self.pservice = presenceservice.get_instance() - name, path = self.pservice.get_preferred_connection() - self.tp_conn_name = name - self.tp_conn_path = path - self.conn = telepathy.client.Connection(name, path) + try: + name, path = self.pservice.get_preferred_connection() + self.tp_conn_name = name + self.tp_conn_path = path + self.conn = telepathy.client.Connection(name, path) + except TypeError: + _logger.debug('Offline') self.initiating = None # Buddy object for you |