From 570a485d84680b1dcb8389e5153a546ef6e88ed9 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 24 May 2007 14:38:54 +0000 Subject: 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. --- (limited to 'services') 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 -- cgit v0.9.1