[PATCH 10/17] dbus/service.py: Use public API for dbus.SessionBus, since we cause an import anyway

Simon McVittie simon.mcvittie at collabora.co.uk
Mon Apr 30 03:43:26 PDT 2007


diff --git a/dbus/service.py b/dbus/service.py
index dbef7e3..551bd84 100644
--- a/dbus/service.py
+++ b/dbus/service.py
@@ -28,7 +28,7 @@ import operator
 import traceback
 
 import _dbus_bindings
-import dbus._dbus as _dbus
+from dbus import SessionBus
 from dbus.exceptions import NameExistsException
 from dbus.exceptions import UnknownMethodException
 from dbus.decorators import method
@@ -95,7 +95,7 @@ class BusName(object):
 
         # get default bus
         if bus == None:
-            bus = _dbus.Bus()
+            bus = SessionBus()
 
         # see if this name is already defined, return it if so
         # FIXME: accessing internals of Bus


More information about the dbus mailing list