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
d20f6cb4
Commit
d20f6cb4
authored
Jun 10, 2024
by
arkohut
Browse files
fix: use Exception to handle all errors
parent
8e9e429a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
backend/config.py
backend/config.py
+2
-7
No files found.
backend/config.py
View file @
d20f6cb4
...
...
@@ -308,13 +308,8 @@ frontend_favicon = FRONTEND_BUILD_DIR / "favicon.png"
if
frontend_favicon
.
exists
():
try
:
shutil
.
copyfile
(
frontend_favicon
,
STATIC_DIR
/
"favicon.png"
)
except
PermissionError
:
logging
.
error
(
f
"No write permission to
{
STATIC_DIR
/
'favicon.png'
}
"
)
except
OSError
as
e
:
if
e
.
errno
==
30
:
# Read-only file system
logging
.
error
(
f
"Read-only file system:
{
STATIC_DIR
/
'favicon.png'
}
"
)
else
:
logging
.
error
(
f
"OS error occurred:
{
e
}
"
)
except
Exception
as
e
:
logging
.
error
(
f
"An error occurred:
{
e
}
"
)
else
:
logging
.
warning
(
f
"Frontend favicon not found at
{
frontend_favicon
}
"
)
...
...
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