You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you run the script with the argument model-type
./nb-dt-import.py --slugs cisco-ws-c2960-24tc-l
Then I will get an error:
Traceback (most recent call last):
File "/home/username/reps/Device-Type-Library-Import/./nb-dt-import.py", line 54, in <module>
main()
File "/home/username/reps/Device-Type-Library-Import/./nb-dt-import.py", line 32, in main
module_types = sdr.parse_files(files, slugs=args.slugs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/username/reps/Device-Type-Library-Import/repo.py", line 101, in parse_files
if slugs and True not in [True if s.casefold() in data['slug'].casefold() else False for s in slugs]:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/username/reps/Device-Type-Library-Import/repo.py", line 101, in <listcomp>
if slugs and True not in [True if s.casefold() in data['slug'].casefold() else False for s in slugs]:
~~~~^^^^^^^^
KeyError: 'slug'
I think it's because of "module-types".
The files in it do not have the "slug" attribute.
The text was updated successfully, but these errors were encountered:
If you run the script with the argument model-type
./nb-dt-import.py --slugs cisco-ws-c2960-24tc-l
Then I will get an error:
I think it's because of "module-types".
The files in it do not have the "slug" attribute.
The text was updated successfully, but these errors were encountered: