Skip to content

Fail to import device types when specifying slugs #137

@BorisBachere

Description

@BorisBachere

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions