comparison src/bridge/bridge_constructor/dbus_frontend_template.py @ 1917:05a5a125a238

bridge (frontend): raise a BridgeExceptionNoService on org.freedesktop.DBus.Error.Spawn.ExecFailed D-Bus error
author Goffi <goffi@goffi.org>
date Mon, 21 Mar 2016 19:44:16 +0100
parents b0ed4863dbc7
children 2daf7b4c6756
comparison
equal deleted inserted replaced
1916:72837638f076 1917:05a5a125a238
68 self.db_core_iface = dbus.Interface(self.db_object, 68 self.db_core_iface = dbus.Interface(self.db_object,
69 dbus_interface=const_INT_PREFIX + const_CORE_SUFFIX) 69 dbus_interface=const_INT_PREFIX + const_CORE_SUFFIX)
70 self.db_plugin_iface = dbus.Interface(self.db_object, 70 self.db_plugin_iface = dbus.Interface(self.db_object,
71 dbus_interface=const_INT_PREFIX + const_PLUGIN_SUFFIX) 71 dbus_interface=const_INT_PREFIX + const_PLUGIN_SUFFIX)
72 except dbus.exceptions.DBusException, e: 72 except dbus.exceptions.DBusException, e:
73 if e._dbus_error_name == 'org.freedesktop.DBus.Error.ServiceUnknown': 73 if e._dbus_error_name in ('org.freedesktop.DBus.Error.ServiceUnknown',
74 'org.freedesktop.DBus.Error.Spawn.ExecFailed'):
74 raise BridgeExceptionNoService 75 raise BridgeExceptionNoService
75 elif e._dbus_error_name == 'org.freedesktop.DBus.Error.NotSupported': 76 elif e._dbus_error_name == 'org.freedesktop.DBus.Error.NotSupported':
76 log.error(_(u"D-Bus is not launched, please see README to see instructions on how to launch it")) 77 log.error(_(u"D-Bus is not launched, please see README to see instructions on how to launch it"))
77 raise BridgeInitError 78 raise BridgeInitError
78 else: 79 else: