ui: handle devices and receivers with no firmware information
This commit is contained in:
parent
d5a3a4fe7e
commit
072f932206
|
|
@ -73,8 +73,9 @@ def _print_device(dev):
|
|||
if dev.polling_rate:
|
||||
print (' Polling rate :', dev.polling_rate, 'ms (%dHz)' % (1000 // dev.polling_rate))
|
||||
print (' Serial number:', dev.serial)
|
||||
for fw in dev.firmware:
|
||||
print (' %11s:' % fw.kind, (fw.name + ' ' + fw.version).strip())
|
||||
if dev.firmware:
|
||||
for fw in dev.firmware:
|
||||
print (' %11s:' % fw.kind, (fw.name + ' ' + fw.version).strip())
|
||||
|
||||
if dev.power_switch_location:
|
||||
print (' The power switch is located on the %s.' % dev.power_switch_location)
|
||||
|
|
|
|||
|
|
@ -525,8 +525,9 @@ def _update_details(button):
|
|||
yield (_("Serial"), '...')
|
||||
|
||||
if read_all:
|
||||
for fw in list(device.firmware):
|
||||
yield (' ' + _(str(fw.kind)), (fw.name + ' ' + fw.version).strip())
|
||||
if device.firmware:
|
||||
for fw in list(device.firmware):
|
||||
yield (' ' + _(str(fw.kind)), (fw.name + ' ' + fw.version).strip())
|
||||
elif device.kind is None or device.online:
|
||||
yield (' %s' % _("Firmware"), '...')
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue