machines: don't ignore errors when parsing secretsData json

This commit is contained in:
Jörg Thalheim
2024-02-06 15:13:34 +01:00
parent 8db4d31a52
commit f1756c3a43

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