From ff488540fa1e21f7d09e532d7f1420da3e8ecfd3 Mon Sep 17 00:00:00 2001 From: haosenwang1018 <167664334+haosenwang1018@users.noreply.github.com> Date: Thu, 26 Feb 2026 02:21:28 +0000 Subject: [PATCH] fix: replace 2 bare except clauses with except Exception --- tools/precompiler/precompiler.py | 2 +- tools/private/update_deps/update_pip_deps.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/precompiler/precompiler.py b/tools/precompiler/precompiler.py index e7c693c195..0afc2be530 100644 --- a/tools/precompiler/precompiler.py +++ b/tools/precompiler/precompiler.py @@ -214,7 +214,7 @@ async def _process_request(self, request: "JsonWorkRequest") -> None: # We don't send a response because we assume the request that # triggered cancelling sent the response raise - except: + except Exception: _logger.exception("Unhandled error: request=%s", request) self._send_response( { diff --git a/tools/private/update_deps/update_pip_deps.py b/tools/private/update_deps/update_pip_deps.py index 1034382f0d..406697bc4d 100755 --- a/tools/private/update_deps/update_pip_deps.py +++ b/tools/private/update_deps/update_pip_deps.py @@ -96,7 +96,7 @@ def _get_deps(report: dict) -> list[Dep]: url=dep["download_info"]["url"], sha256=dep["download_info"]["archive_info"]["hash"][len("sha256=") :], ) - except: + except Exception: debug_dep = textwrap.indent(json.dumps(dep, indent=4), " " * 4) print(f"Could not parse the response from 'pip':\n{debug_dep}") raise