machines: don't ignore errors when parsing secretsData json
All checks were successful
checks-impure / test (pull_request) Successful in 1m46s
checks / test (pull_request) Successful in 2m44s

This commit is contained in:
Jörg Thalheim 2024-02-06 15:13:34 +01:00
parent 91f26a4743
commit c66c25aeb7

View File

@ -70,11 +70,10 @@ class Machine:
if self.deployment_info["secretsData"]:
try:
return json.loads(Path(self.deployment_info["secretsData"]).read_text())
except json.JSONDecodeError:
log.error(
except json.JSONDecodeError as e:
raise ClanError(
f"Failed to parse secretsData for machine {self.name} as json"
)
return {}
) from e
return {}
@property