dev1.1.0g // Bad csv format breaks 'ztp' commands
derek-shnosh opened this issue · 3 comments
Received the following traceback when my keystore_id rows had more delimiters than the header row.
root@freeztp-dev:/etc/ztp/sis# ztp request external-keystore-test SBS
Traceback (most recent call last):
File "/bin/ztp", line 3511, in <module>
interpreter()
File "/bin/ztp", line 3058, in interpreter
config.load_external()
File "/bin/ztp", line 668, in load_external
external_keystores.load()
File "/bin/ztp", line 2992, in load
if key[:7] == "idarray":
TypeError: 'NoneType' object has no attribute '__getitem__'
All ZTP commands gave the same traceback until the csv format was fixed.
Sounds like it's doing exactly what it's supposed to.
@icovada of course; but from what I understand, error handling should be implemented to adhere to development best practices; so the end user is provided with a simplistic error message. Which would prevent the end user from having to seek assistance; i.e. "Missing in external CSV" is easier to decipher and take action than a traceback.
@PackeTsar has done an excellent job all around with FreeZTP. I created the issue to bring the traceback to his attention, not so much to seek assistance with the error.
Added bug to tracker issue