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

John (J5) Palmieri johnp at redhat.com
Mon Apr 30 14:52:53 PDT 2007


Looks good.

On Mon, 2007-04-30 at 11:43 +0100, Simon McVittie wrote:
> 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
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus



More information about the dbus mailing list