Merge pull request 'machines: don't ignore errors when parsing secretsData json' (#817) from Mic92-target_host into main
All checks were successful
checks / test (push) Successful in 30s
checks-impure / test (push) Successful in 1m36s

This commit is contained in:
clan-bot 2024-02-06 14:18:38 +00:00
commit 8234f127e5

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