Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2007-05-24 14:38:54 (GMT)
committer Simon McVittie <simon.mcvittie@collabora.co.uk>2007-05-24 17:59:13 (GMT)
commit570a485d84680b1dcb8389e5153a546ef6e88ed9 (patch)
treefe755ce7e29299b3f1d56d75cb71de200557d41f /services
parent2abcd89c1fb03845c4867818c6f0126832ebff47 (diff)
services/presence/presenceservice: don't use deprecated dbus.glib
Importing dbus.glib has strange magical side-effects. Instead, make it more explicit that the default dbus-python main loop is being set to the GLib main loop.
Diffstat (limited to 'services')
-rw-r--r--services/presence/presenceservice.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/services/presence/presenceservice.py b/services/presence/presenceservice.py
index f3818eb..5b6161a 100644
--- a/services/presence/presenceservice.py
+++ b/services/presence/presenceservice.py
@@ -18,11 +18,9 @@ import gobject
import dbus
import dbus.service
from dbus.gobject_service import ExportedGObject
+from dbus.mainloop.glib import DBusGMainLoop
import logging
-# Note that this import has side effects!
-import dbus.glib
-
from telepathy.client import ManagerRegistry, Connection
from telepathy.interfaces import (CONN_MGR_INTERFACE, CONN_INTERFACE)
from telepathy.constants import (CONNECTION_STATUS_CONNECTING,
@@ -422,6 +420,7 @@ class PresenceService(ExportedGObject):
def main(test_num=0, randomize=False):
loop = gobject.MainLoop()
+ dbus_mainloop_wrapper = DBusGMainLoop(set_as_default=True)
if test_num > 0:
from pstest import TestPresenceService