don't always show Notifications in details
This commit is contained in:
parent
87e2f1cad7
commit
065b8628d2
|
@ -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)))
|
||||
|
|
|
@ -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))
|
||||
|
||||
|
|
Loading…
Reference in New Issue