From 3d73d2cae85b3033f7fedec59d3dbab389b5294a Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Fri, 31 Aug 2007 10:44:50 +0000 Subject: Only try to connect to presence service when offline. Fix for #3099 --- 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: -- cgit v0.9.1