Skip to content

Commit 1308d89

Browse files
committed
gnu-json-result: fix warning 'E722 Do not use bare except'
1 parent d0201da commit 1308d89

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

util/gnu-json-result.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
)
3535
if result:
3636
current[path.name] = result.group(1)
37-
except:
38-
pass
37+
except Exception as e:
38+
print(f"Error processing file {path}: {e}", file=sys.stderr)
39+
3940

4041
print(json.dumps(out, indent=2, sort_keys=True))

0 commit comments

Comments
 (0)