bridge (frontend): raise a BridgeExceptionNoService on org.freedesktop.DBus.Error.Spawn.ExecFailed D-Bus error
This commit is contained in:
parent
30e4e3559f
commit
d02c466ddd
3 changed files with 7 additions and 5 deletions
|
|
@ -70,7 +70,8 @@ class DBusBridgeFrontend(BridgeFrontend):
|
||||||
self.db_plugin_iface = dbus.Interface(self.db_object,
|
self.db_plugin_iface = dbus.Interface(self.db_object,
|
||||||
dbus_interface=const_INT_PREFIX + const_PLUGIN_SUFFIX)
|
dbus_interface=const_INT_PREFIX + const_PLUGIN_SUFFIX)
|
||||||
except dbus.exceptions.DBusException, e:
|
except dbus.exceptions.DBusException, e:
|
||||||
if e._dbus_error_name == 'org.freedesktop.DBus.Error.ServiceUnknown':
|
if e._dbus_error_name in ('org.freedesktop.DBus.Error.ServiceUnknown',
|
||||||
|
'org.freedesktop.DBus.Error.Spawn.ExecFailed'):
|
||||||
raise BridgeExceptionNoService
|
raise BridgeExceptionNoService
|
||||||
elif e._dbus_error_name == 'org.freedesktop.DBus.Error.NotSupported':
|
elif e._dbus_error_name == 'org.freedesktop.DBus.Error.NotSupported':
|
||||||
log.error(_(u"D-Bus is not launched, please see README to see instructions on how to launch it"))
|
log.error(_(u"D-Bus is not launched, please see README to see instructions on how to launch it"))
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,7 @@ class DbusObject(dbus.service.Object):
|
||||||
|
|
||||||
@dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
|
@dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||||
signature='sss')
|
signature='sss')
|
||||||
def progressError(self, error, profile, arg_2):
|
def progressError(self, id, error, profile):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
|
@dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||||
|
|
@ -641,8 +641,8 @@ class DBusBridge(Bridge):
|
||||||
def presenceUpdate(self, entity_jid, show, priority, statuses, profile):
|
def presenceUpdate(self, entity_jid, show, priority, statuses, profile):
|
||||||
self.dbus_bridge.presenceUpdate(entity_jid, show, priority, statuses, profile)
|
self.dbus_bridge.presenceUpdate(entity_jid, show, priority, statuses, profile)
|
||||||
|
|
||||||
def progressError(self, error, profile, arg_2):
|
def progressError(self, id, error, profile):
|
||||||
self.dbus_bridge.progressError(error, profile, arg_2)
|
self.dbus_bridge.progressError(id, error, profile)
|
||||||
|
|
||||||
def progressFinished(self, id, metadata, profile):
|
def progressFinished(self, id, metadata, profile):
|
||||||
self.dbus_bridge.progressFinished(id, metadata, profile)
|
self.dbus_bridge.progressFinished(id, metadata, profile)
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,8 @@ class DBusBridgeFrontend(BridgeFrontend):
|
||||||
self.db_plugin_iface = dbus.Interface(self.db_object,
|
self.db_plugin_iface = dbus.Interface(self.db_object,
|
||||||
dbus_interface=const_INT_PREFIX + const_PLUGIN_SUFFIX)
|
dbus_interface=const_INT_PREFIX + const_PLUGIN_SUFFIX)
|
||||||
except dbus.exceptions.DBusException, e:
|
except dbus.exceptions.DBusException, e:
|
||||||
if e._dbus_error_name == 'org.freedesktop.DBus.Error.ServiceUnknown':
|
if e._dbus_error_name in ('org.freedesktop.DBus.Error.ServiceUnknown',
|
||||||
|
'org.freedesktop.DBus.Error.Spawn.ExecFailed'):
|
||||||
raise BridgeExceptionNoService
|
raise BridgeExceptionNoService
|
||||||
elif e._dbus_error_name == 'org.freedesktop.DBus.Error.NotSupported':
|
elif e._dbus_error_name == 'org.freedesktop.DBus.Error.NotSupported':
|
||||||
log.error(_(u"D-Bus is not launched, please see README to see instructions on how to launch it"))
|
log.error(_(u"D-Bus is not launched, please see README to see instructions on how to launch it"))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue