From 86e770385ef9410342b8f719fbf1408677bb864b Mon Sep 17 00:00:00 2001 From: Ole Herman Schumacher Elgesem <4048546+olehermanse@users.noreply.github.com> Date: Tue, 12 May 2026 14:32:32 +0200 Subject: [PATCH] Fix for Except block handles 'BaseException' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- src/cfengine_cli/lint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cfengine_cli/lint.py b/src/cfengine_cli/lint.py index 048bf21..6684804 100644 --- a/src/cfengine_cli/lint.py +++ b/src/cfengine_cli/lint.py @@ -1269,7 +1269,7 @@ def _lint_json_plain(filename: str) -> int: r = 0 try: data = json.loads(data) - except: + except json.JSONDecodeError: r = 1 print(_pass_fail_filename(filename, r))