mirror of
https://github.com/netbox-community/Device-Type-Library-Import.git
synced 2024-11-21 23:23:17 +01:00
Fix import failure when no vendor specified
Close #44 Fix regression introduced by #34 Check to see if each item in the list produced by `split` is iterable. If it is not, remove it. This should only occur when no vendor is specified since a non-empty string is truthy.
This commit is contained in:
parent
625bdba434
commit
f0c53e29a3
@ -8,8 +8,8 @@ NETBOX_URL = os.getenv("NETBOX_URL")
|
||||
NETBOX_TOKEN = os.getenv("NETBOX_TOKEN")
|
||||
IGNORE_SSL_ERRORS = (os.getenv("IGNORE_SSL_ERRORS", "False") == "True")
|
||||
|
||||
# optionnally load vendors through a space separated list as env var
|
||||
VENDORS = os.getenv("VENDORS", "").split(",")
|
||||
# optionally load vendors through a comma separated list as env var
|
||||
VENDORS = list(filter(None, os.getenv("VENDORS", "").split(",")))
|
||||
|
||||
# optionally load device types through a space separated list as env var
|
||||
SLUGS = os.getenv("SLUGS", "").split()
|
||||
|
Loading…
Reference in New Issue
Block a user