From 1eef88eb44ef59553f289d5e156c4eb102f36b43 Mon Sep 17 00:00:00 2001 From: "Peter F. Patel-Schneider" Date: Mon, 16 Mar 2020 10:53:05 -0400 Subject: [PATCH] cli: handle receivers with no firmware information --- lib/solaar/cli/show.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/solaar/cli/show.py b/lib/solaar/cli/show.py index ebd91231..11eff53e 100644 --- a/lib/solaar/cli/show.py +++ b/lib/solaar/cli/show.py @@ -34,8 +34,9 @@ def _print_receiver(receiver): print (' Device path :', receiver.path) print (' USB id : 046d:%s' % receiver.product_id) print (' Serial :', receiver.serial) - for f in receiver.firmware: - print (' %-11s: %s' % (f.kind, f.version)) + if receiver.firmware: + for f in receiver.firmware: + print (' %-11s: %s' % (f.kind, f.version)) print (' Has', paired_count, 'paired device(s) out of a maximum of %d.' % receiver.max_devices) if receiver.remaining_pairings() and receiver.remaining_pairings() >= 0 :