Skip to content

Commit

Permalink
ui: downgrade assertion on missing notification flag to warning
Browse files Browse the repository at this point in the history
  • Loading branch information
pfps committed Jan 30, 2024
1 parent 86fa375 commit 28493f7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/solaar/listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,12 @@ def has_started(self):
if _log.isEnabledFor(_INFO):
_log.info('%s: notifications listener has started (%s)', self.receiver, self.receiver.handle)
nfs = self.receiver.enable_connection_notifications()
assert self.receiver.isDevice or ((nfs if nfs else 0) & _hidpp10.NOTIFICATION_FLAG.wireless), \
'Receiver on %s does not support connection notifications, GUI will not show it' % self.receiver.path
if _log.isEnabledFor(_WARNING):
if not self.receiver.isDevice and not ((nfs if nfs else 0) & _hidpp10.NOTIFICATION_FLAG.wireless):
_log.warning(
'Receiver on %s might not support connection notifications, GUI might not show its devices',
self.receiver.path
)
self.receiver.status[_status.KEYS.NOTIFICATION_FLAGS] = nfs
self.receiver.notify_devices()
self._status_changed(self.receiver) # , _status.ALERT.NOTIFICATION)
Expand Down

0 comments on commit 28493f7

Please sign in to comment.