gui: pass a dbus device error on as signal
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
1ddf899d3e
commit
daac9114e1
|
@ -155,6 +155,8 @@ class TuhiKeteDevice(_DBusObject):
|
|||
(GObject.SignalFlags.RUN_FIRST, None, (GObject.TYPE_PYOBJECT,)),
|
||||
'registered':
|
||||
(GObject.SignalFlags.RUN_FIRST, None, (GObject.TYPE_PYOBJECT,)),
|
||||
'device-error':
|
||||
(GObject.SignalFlags.RUN_FIRST, None, (GObject.TYPE_PYOBJECT, int)),
|
||||
}
|
||||
|
||||
def __init__(self, manager, objpath):
|
||||
|
@ -246,6 +248,7 @@ class TuhiKeteDevice(_DBusObject):
|
|||
logger.error(f'{self}: wrong device, please re-register.')
|
||||
elif err < 0:
|
||||
logger.error(f'{self}: an error occured: {os.strerror(-err)}')
|
||||
self.emit('device-error', self, err)
|
||||
self.notify('listening')
|
||||
elif signal == 'SyncState':
|
||||
self._sync_state = parameters[0]
|
||||
|
|
Loading…
Reference in New Issue