receiver: handle exception when device is not available while being added
This commit is contained in:
parent
a4b54df433
commit
9842972d8b
|
@ -392,3 +392,5 @@ def _process_receiver_event(action, device_info):
|
|||
_error_callback('permissions', device_info.path)
|
||||
except Exception:
|
||||
_error_callback('permissions', device_info.path)
|
||||
except _base.NoReceiver:
|
||||
_error_callback('nodevice', device_info.path)
|
||||
|
|
|
@ -54,6 +54,12 @@ def _error_dialog(reason, object):
|
|||
_('Found a Logitech Receiver (%s), but did not have permission to open it.') % object + '\n\n' +
|
||||
_("If you've just installed Solaar, try removing the receiver and plugging it back in.")
|
||||
)
|
||||
elif reason == 'nodevice':
|
||||
title = _('Cannot connect to device error')
|
||||
text = (
|
||||
_('Found a Logitech receiver or device at %s, but encountered an error connecting to it.') % object + '\n\n' +
|
||||
_('Try removing the device and plugging it back in or turning it off and then on.')
|
||||
)
|
||||
elif reason == 'unpair':
|
||||
title = _('Unpairing failed')
|
||||
text = (
|
||||
|
|
Loading…
Reference in New Issue