remove BaseException usage

This commit is contained in:
mr-tz
2024-01-31 11:25:32 +01:00
committed by Moritz
parent 75800b9d2e
commit 66c2f07ca8
2 changed files with 4 additions and 8 deletions

View File

@@ -309,9 +309,8 @@ class InvalidAttckOrMbcTechnique(Lint):
with data_path.open("rb") as fd:
self.data = json.load(fd)
self.enabled_frameworks = self.data.keys()
except BaseException:
# If linter-data.json is not present, or if an error happen
# we log an error and lint nothing.
except (FileNotFoundError, json.decoder.JSONDecodeError):
# linter-data.json missing, or JSON error: log an error and skip this lint
logger.warning(
"Could not load 'scripts/linter-data.json'. The att&ck and mbc information will not be linted."
)