mirror of
https://github.com/sezanzeb/input-remapper
synced 2024-11-04 12:00:16 +00:00
running without the service on dbus failure
This commit is contained in:
parent
b1fff0c286
commit
fc07f96ec7
@ -54,11 +54,20 @@ def get_dbus_interface():
|
|||||||
)
|
)
|
||||||
return Daemon(autoload=False)
|
return Daemon(autoload=False)
|
||||||
|
|
||||||
logger.debug('Found the daemon process')
|
try:
|
||||||
bus = dbus.SessionBus()
|
logger.debug('Found the daemon process')
|
||||||
remote_object = bus.get_object('com.keymapper.Control', '/')
|
bus = dbus.SessionBus()
|
||||||
interface = dbus.Interface(remote_object, 'com.keymapper.Interface')
|
remote_object = bus.get_object('com.keymapper.Control', '/')
|
||||||
logger.debug('Connected to dbus')
|
interface = dbus.Interface(remote_object, 'com.keymapper.Interface')
|
||||||
|
logger.debug('Connected to dbus')
|
||||||
|
except Exception as error:
|
||||||
|
logger.error(
|
||||||
|
'Could not connect to the dbus of "key-mapper-service", mapping '
|
||||||
|
'keys only works as long as the window is open.'
|
||||||
|
)
|
||||||
|
logger.error(error)
|
||||||
|
return Daemon(autoload=False)
|
||||||
|
|
||||||
return interface
|
return interface
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user