diff --git a/lib/solaar/cli.py b/lib/solaar/cli.py index 340ca5c0..a7bd5798 100644 --- a/lib/solaar/cli.py +++ b/lib/solaar/cli.py @@ -137,9 +137,7 @@ def _print_device(dev, verbose=False): if dev.online: notification_flags = hidpp10.get_notification_flags(dev) - if notification_flags is None: - print (" Notifications: N/A.") - else: + if notification_flags is not None: if notification_flags: notification_names = hidpp10.NOTIFICATION_FLAG.flag_names(notification_flags) print (" Notifications: 0x%06X = %s." % (notification_flags, ', '.join(notification_names))) diff --git a/lib/solaar/ui/window.py b/lib/solaar/ui/window.py index d7a56d3e..b377a78b 100644 --- a/lib/solaar/ui/window.py +++ b/lib/solaar/ui/window.py @@ -515,9 +515,7 @@ def _update_details(button): yield (' Firmware', '...') flag_bits = device.status.get(_K.NOTIFICATION_FLAGS) - if flag_bits is None and device.kind is not None: - yield ('Notifications', 'N/A') - else: + if flag_bits is not None: flag_names = ('(none)',) if flag_bits == 0 else _hidpp10.NOTIFICATION_FLAG.flag_names(flag_bits) yield ('Notifications', ('\n%15s' % ' ').join(flag_names))