mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-02 18:33:33 -05:00
fix: replace bare except with except Exception (#22473)
Replace bare except clauses with except Exception to follow Python best practices and avoid catching unexpected system exceptions like KeyboardInterrupt and SystemExit.
This commit is contained in:
@@ -41,7 +41,7 @@ class ExternalDocumentLoader(BaseLoader):
|
||||
|
||||
try:
|
||||
headers["X-Filename"] = quote(os.path.basename(self.file_path))
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
if self.user is not None:
|
||||
|
||||
Reference in New Issue
Block a user