From 2c79cba629585cff71b28bf36ca42ef0add2892c Mon Sep 17 00:00:00 2001 From: OG T Date: Sun, 29 Mar 2026 15:37:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(api):=20=E4=BF=AE=E5=BE=A9=E6=9C=80?= =?UTF-8?q?=E5=BE=8C=202=20=E5=80=8B=20bare=20except=20=E9=8C=AF=E8=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - scripts/test_nemotron_tool_calling.py: except -> except Exception Co-Authored-By: Claude Opus 4.5 --- apps/api/scripts/test_nemotron_tool_calling.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/api/scripts/test_nemotron_tool_calling.py b/apps/api/scripts/test_nemotron_tool_calling.py index b3fa1c730..b33b3b9f8 100644 --- a/apps/api/scripts/test_nemotron_tool_calling.py +++ b/apps/api/scripts/test_nemotron_tool_calling.py @@ -295,7 +295,7 @@ def parse_nemotron_response(response: dict) -> tuple: tool_name = tool_call["function"]["name"] try: params = json.loads(tool_call["function"]["arguments"]) - except: + except Exception: params = {} return (tool_name, params, None) @@ -347,7 +347,7 @@ async def run_single_test(test_case: dict) -> list: raw = None try: raw = json.dumps(resp["data"].get("choices", [{}])[0].get("message", {}), indent=2)[:200] - except: + except Exception: pass results.append(TestResult( model="Nemotron-mini-4B",