(func)
return _exec
Decorator function to connect to the session dbus bus
Decorator function to connect to the session dbus bus
Decorator function to connect to the session dbus bus
def with_proxy(func):
    """Decorator function to connect to the session dbus bus"""
    dbg('dbus client call: %s' % func.__name__)
    def _exec(*args, **argd):
        bus = dbus.SessionBus()
        try:
            proxy = bus.get_object(BUS_NAME, BUS_PATH)

        except dbus.DBusException as e:
            sys.exit(
                "Remotinator can't connect to terminator. " +
                "May be terminator is not running.")

        return func(proxy, *args, **argd)
    return _exec
def with_proxy ( func ) : dbg ( 'dbus client call: %s' % func . __name__ ) def _exec ( * args , * * argd ) : bus = dbus . SessionBus ( ) try : proxy = bus . get_object ( BUS_NAME , BUS_PATH ) except dbus . DBusException as e : sys . exit ( "Remotinator can't connect to terminator. " + "May be terminator is not running." ) return func ( proxy , * args , * * argd ) return _exec