From 7eb8a4ea6459998ff4272f4872202b623a74630c Mon Sep 17 00:00:00 2001 From: vijay sharma Date: Sat, 31 Jan 2026 10:42:28 +0100 Subject: [PATCH] refactor: remove redundant else block for unexpected exception handling in P30 negative check script --- scripts/gates/p30_neg_check.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/gates/p30_neg_check.py b/scripts/gates/p30_neg_check.py index 08089c0e9..29c4f1c29 100644 --- a/scripts/gates/p30_neg_check.py +++ b/scripts/gates/p30_neg_check.py @@ -54,11 +54,11 @@ def check_p30_neg(): print("P30_NEG_EXPECTED_BLOCK") print("[OK] Blocked by Market Hours despite Live Enablement.") sys.exit(0) - else: - # Unexpected error: Log with traceback - logger.error(f"Caught unexpected exception: {msg}", exc_info=True) - print(f"ERROR: Unexpected exception: {msg}") - sys.exit(1) + + # Unexpected error: Log with traceback + logger.error(f"Caught unexpected exception: {msg}", exc_info=True) + print(f"ERROR: Unexpected exception: {msg}") + sys.exit(1) if __name__ == "__main__":