From 1308d899075ce927b6dbcf3d154d8b6e094dfa19 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 16 Mar 2025 08:57:58 +0100 Subject: [PATCH] gnu-json-result: fix warning 'E722 Do not use bare except' --- util/gnu-json-result.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/util/gnu-json-result.py b/util/gnu-json-result.py index c8c624b3f..ffd39233b 100644 --- a/util/gnu-json-result.py +++ b/util/gnu-json-result.py @@ -34,7 +34,8 @@ for filepath in test_dir.glob("**/*.log"): ) if result: current[path.name] = result.group(1) - except: - pass + except Exception as e: + print(f"Error processing file {path}: {e}", file=sys.stderr) + print(json.dumps(out, indent=2, sort_keys=True))