mirror of
https://github.com/open-webui/open-webui
synced 2024-11-26 14:02:29 +00:00
backend: make dotenv optional
Signed-off-by: lucasew <lucas59356@gmail.com>
This commit is contained in:
parent
f079cb6b56
commit
e3503d6617
@ -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...")
|
||||
|
||||
|
||||
####################################
|
||||
|
Loading…
Reference in New Issue
Block a user