Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/webactivity.py
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2007-08-31 10:44:50 (GMT)
committer Simon Schampijer <simon@schampijer.de>2007-08-31 10:44:50 (GMT)
commit3d73d2cae85b3033f7fedec59d3dbab389b5294a (patch)
tree0d8af01924dc792721ba9555055f284de4c58fbd /webactivity.py
parentd891133552c7697d6c96d00057ab53e9d579a4e8 (diff)
Only try to connect to presence service when offline.
Fix for #3099
Diffstat (limited to 'webactivity.py')
-rwxr-xr-xwebactivity.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/webactivity.py b/webactivity.py
index d76967d..2e2795a 100755
--- a/webactivity.py
+++ b/webactivity.py
@@ -122,12 +122,15 @@ class WebActivity(activity.Activity):
self.messenger = None
self.connect('shared', self._shared_cb)
- # Get the Presence Service
+ # 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
if self._shared_activity is not None: