mirror of
https://github.com/netbox-community/Device-Type-Library-Import.git
synced 2025-08-09 13:55:02 +02:00
update: README and added dotenv other small stuff
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
load_dotenv()
|
||||
|
||||
NETBOX_URL = str(os.getenv("NETBOX_URL"))
|
||||
NETBOX_TOKEN = str(os.getenv("NETBOX_TOKEN"))
|
||||
@ -7,4 +9,4 @@ MANDATORY_ENV_VARS = ["NETBOX_URL", "NETBOX_TOKEN"]
|
||||
|
||||
for var in MANDATORY_ENV_VARS:
|
||||
if var not in os.environ:
|
||||
raise EnvironmentError("Failed because {} is not set.".format(var))
|
||||
raise EnvironmentError("Failed because {} is not set.".format(var))
|
||||
|
Reference in New Issue
Block a user