Fix RETRY_DELAY typing

The default value needs to be a string to prevent conversion errors, as we assume the user provided variable is a string (due to the way DotEnv handle variables)
This commit is contained in:
NicJames2378
2024-08-05 13:25:19 -04:00
committed by GitHub
parent 7690f7b21b
commit 593e0abda8

View File

@@ -12,7 +12,7 @@ NETBOX_URL = os.getenv("NETBOX_URL")
NETBOX_TOKEN = os.getenv("NETBOX_TOKEN")
IGNORE_SSL_ERRORS = (os.getenv("IGNORE_SSL_ERRORS", default="False") == "True")
REPO_PATH = f"{os.path.dirname(os.path.realpath(__file__))}/repo"
RETRY_DELAY = os.getenv("RETRY_DELAY", default=5) # Configurable for more conjested networks. 5 generally works.
RETRY_DELAY = os.getenv("RETRY_DELAY", default="5") # Configurable for more conjested networks. 5 generally works.
# DotEnv only reads variables as strings. Ensure it is a digit value and convert (or default).
if not RETRY_DELAY.isdigit():