Device-Type-Library-Import icon indicating copy to clipboard operation
Device-Type-Library-Import copied to clipboard

Fail to import device types when specifying slugs

Open BorisBachere opened this issue 1 year ago • 0 comments

Example extracted from .env:

SLUGS=cisco-n9k-c93360yc-fx2
VENDORS=Cisco

Below error appends:

Traceback (most recent call last):
  File "/home/bbacspy8/projects2/Device-Type-Library-Import/./nb-dt-import.py", line 54, in <module>
    main()
  File "/home/bbacspy8/projects2/Device-Type-Library-Import/./nb-dt-import.py", line 32, in main
    module_types = settings.dtl_repo.parse_files(files, slugs=args.slugs)
  File "/home/bbacspy8/projects2/Device-Type-Library-Import/repo.py", line 111, in parse_files
    if slugs and True not in [
  File "/home/bbacspy8/projects2/Device-Type-Library-Import/repo.py", line 112, in <listcomp>
    True if s.casefold() in data["slug"].casefold() else False for s in slugs
KeyError: 'slug'

BorisBachere avatar May 28 '24 09:05 BorisBachere