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:
Ethan T.
2026-03-16 06:48:23 +08:00
committed by GitHub
parent bcd313c363
commit a229f9ea42
9 changed files with 14 additions and 14 deletions

View File

@@ -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: