diff --git a/lib/solaar/cli/show.py b/lib/solaar/cli/show.py index 11eff53e..423247e3 100644 --- a/lib/solaar/cli/show.py +++ b/lib/solaar/cli/show.py @@ -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) diff --git a/lib/solaar/ui/window.py b/lib/solaar/ui/window.py index 959e4c81..bed5dbba 100644 --- a/lib/solaar/ui/window.py +++ b/lib/solaar/ui/window.py @@ -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"), '...')