backend: make dotenv optional

Signed-off-by: lucasew <lucas59356@gmail.com>
This commit is contained in:
lucasew 2024-01-19 17:12:14 -03:00
parent f079cb6b56
commit e3503d6617

View File

@ -1,4 +1,3 @@
from dotenv import load_dotenv, find_dotenv
import os
@ -14,7 +13,11 @@ from constants import ERROR_MESSAGES
from pathlib import Path
load_dotenv(find_dotenv("../.env"))
try:
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv("../.env"))
except ImportError:
print("dotenv not installed, skipping...")
####################################