From 6b1c3d1cec372a2bdc97fcd631cb1859c584d1dc Mon Sep 17 00:00:00 2001 From: Pavel Tisnovsky Date: Tue, 25 Aug 2026 21:49:52 +0200 Subject: [PATCH] LCORE-3510: Proper exception catch in environment.py --- tests/e2e/features/environment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/features/environment.py b/tests/e2e/features/environment.py index cd05d3bdc..8025d0e46 100644 --- a/tests/e2e/features/environment.py +++ b/tests/e2e/features/environment.py @@ -326,7 +326,7 @@ def after_scenario(context: Context, scenario: Scenario) -> None: provider_shield_id=provider_shield_id, ) print("Re-registered shield llama-guard") - except Exception as e: # pylint: disable=broad-exception-caught + except (TypeError, ValueError, RuntimeError, KeyboardInterrupt) as e: print(f"Warning: Could not re-register shield: {e}")