Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/collaboration/connectionmanager.py
diff options
context:
space:
mode:
Diffstat (limited to 'collaboration/connectionmanager.py')
-rw-r--r--collaboration/connectionmanager.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/collaboration/connectionmanager.py b/collaboration/connectionmanager.py
index 5ae59dd..1549d41 100644
--- a/collaboration/connectionmanager.py
+++ b/collaboration/connectionmanager.py
@@ -23,8 +23,7 @@ from functools import partial
import dbus
from dbus import PROPERTIES_IFACE
-from telepathy.interfaces import ACCOUNT, \
- ACCOUNT_MANAGER
+from telepathy.interfaces import (ACCOUNT, ACCOUNT_MANAGER)
from telepathy.constants import CONNECTION_STATUS_CONNECTED
ACCOUNT_MANAGER_SERVICE = 'org.freedesktop.Telepathy.AccountManager'
@@ -51,8 +50,9 @@ class ConnectionManager(object):
dbus_interface=PROPERTIES_IFACE)
for account_path in account_paths:
obj = bus.get_object(ACCOUNT_MANAGER_SERVICE, account_path)
- obj.connect_to_signal('AccountPropertyChanged',
- partial(self.__account_property_changed_cb, account_path))
+ obj.connect_to_signal(
+ 'AccountPropertyChanged',
+ partial(self.__account_property_changed_cb, account_path))
connection_path = obj.Get(ACCOUNT, 'Connection')
if connection_path != '/':
try:
@@ -73,10 +73,11 @@ class ConnectionManager(object):
connection_name = connection_path.replace('/', '.')[1:]
bus = dbus.SessionBus()
connection = bus.get_object(connection_name, connection_path)
- connection.connect_to_signal('StatusChanged',
- partial(self.__status_changed_cb, account_path))
+ connection.connect_to_signal(
+ 'StatusChanged',
+ partial(self.__status_changed_cb, account_path))
self._connections_per_account[account_path] = \
- Connection(account_path, connection)
+ Connection(account_path, connection)
account = bus.get_object(ACCOUNT_MANAGER_SERVICE, account_path)
status = account.Get(ACCOUNT, 'ConnectionStatus')
@@ -115,6 +116,8 @@ class ConnectionManager(object):
_connection_manager = None
+
+
def get_connection_manager():
global _connection_manager
if not _connection_manager: