command line tool: TypeError when omiting -d switch while parsing config file
Got a TypeError when omiting the -d
switch while parsing a config file. The config file is a valid one, since
rss2i -a config -f test.cfg -d 9,2
returns
rss2i: Detecting connected devices... [9, 2]
rss2i: Configuration of device 9 successful
rss2i: Configuration of device 2 successful
rss2i: Disconnecting devices...ok
Reproduce
Run
rss2i -a parse -f test.cfg
Actual Result
Traceback (most recent call last):
File "/home/gerrit/bin/rss2i", line 2334, in <module>
main()
File "/home/gerrit/bin/rss2i", line 2302, in main
args.device = [dev for sublist in args.device for dev in sublist]
TypeError: 'NoneType' object is not iterable
Expected Result
usage: rss2i parse [-h] -f FILE -d DEVICE
rss2i parse: error: the following arguments are required: -d/--device