Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
e3503d66
Commit
e3503d66
authored
Jan 19, 2024
by
lucasew
Browse files
backend: make dotenv optional
Signed-off-by:
lucasew
<
lucas59356@gmail.com
>
parent
f079cb6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
backend/config.py
backend/config.py
+5
-2
No files found.
backend/config.py
View file @
e3503d66
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..."
)
####################################
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment