rss2i.py: KeyError when running the getid command with unknown revision or board type
I'm playing around with some new RSS2I boards (Revision: F, Antenna type: Array) and getting a KeyError
when executing the getid
command.
This issue has two faces: Firstly, the new revision and antenna/board type should be supported (see section 9.0 of the unofficial API 2.0 doc preview), but secondly, an unknown revision/board type should not result in an error message in any case.
Reproduce
RSS2I board Rev. F (5) with an antenna array (2) connected via USB. Run
rss2i -a getid
Expected Behaviour
rss2i: Detecting connected devices... [19]
Device 19 Hardware Rev. F; antenna array; Firmware v1.1.255 @ /dev/ttyUSB4
rss2i: Disconnecting devices...ok
or (in the case of an unknown revision (e.g. 6) or type (e.g. 3))
rss2i: Detecting connected devices... [19]
Device 19 Unsupported Hardware Revision (6); unknown board type (3); Firmware v1.1.255 @ /dev/ttyUSB4
rss2i: Disconnecting devices...ok
Actual Behaviour
rss2i: Detecting connected devices... [19]
rss2i: Disconnecting devices...ok
Traceback (most recent call last):
File "/home/gerrit/bin/rss2i", line 2532, in <module>
main()
File "/home/gerrit/bin/rss2i", line 2515, in main
args.func(args)
File "/home/gerrit/bin/rss2i", line 730, in get_id
fs.format(resp_id, revisions[response[0]],
KeyError: 5