Device whitout IP breake the code
New error case at execution :
user@machine $ python3 askthom.py --debug
DEBUG[askthom] Ask Thom for known devices list @192.168.1.254
Traceback (most recent call last):
File "./askthom.py", line 241, in <module>
main(cli_options)
File "./askthom.py", line 145, in main
devices = get_devices(options.protocol, options.address, options.path)
File "./askthom.py", line 205, in get_devices
device["ip"] = ips[i]
IndexError: list index out of range
zsh: exit 1 python3 askthom.py
Debug :
>>>>> PDB post_mortem (IO-capturing turned off) >>>>>
> ./askthom.py(206)get_devices()
-> device["ip"] = ips[i]
(Pdb) i
27
(Pdb) len(devices)
35
(Pdb) len(ips)
27
(Pdb) len(interfaces)
*** NameError: name 'interfaces' is not defined
(Pdb) len(interface)
35
Edited by freezed