apply TRY lint

This commit is contained in:
Jörg Thalheim
2024-09-03 17:56:59 +02:00
parent 68d777166a
commit 403b9cf2cc
26 changed files with 70 additions and 49 deletions

View File

@@ -58,10 +58,11 @@ def build_vm(
try:
vm_data = json.loads(Path(nixos_config_file).read_text())
vm_data["secrets_dir"] = str(secrets_dir)
return vm_data
except json.JSONDecodeError as e:
msg = f"Failed to parse vm config: {e}"
raise ClanError(msg) from e
else:
return vm_data
def get_secrets(