From 716a9c0ba948997a72661eaf00906ee961e3f20a Mon Sep 17 00:00:00 2001 From: evelynmitchell Date: Wed, 18 Dec 2024 19:31:39 -0700 Subject: [PATCH] fix bare except and log the error --- tests/agent_evals/auto_test_eval.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/agent_evals/auto_test_eval.py b/tests/agent_evals/auto_test_eval.py index e9d018fc..9fc14e11 100644 --- a/tests/agent_evals/auto_test_eval.py +++ b/tests/agent_evals/auto_test_eval.py @@ -208,9 +208,10 @@ class SwarmsIssueReporter: deps = [] for dist in pkg_resources.working_set: - deps.append(f"- {dist.key} {dist.version}") + deps.append(f"- {dist.key} {dist.version}") return "\n".join(deps) - except: + except Exception as e: + logger.error(f"Error fetching dependency information: {str(e)}") return "Unable to fetch dependency information" # First, add this method to your SwarmsIssueReporter class