cli: fix restoring backups

There was a bug in `select` that made it output attrsets instead of
lists so we fix the broken refactor done in
5ac629f549.
This commit is contained in:
Michael Hoang
2025-04-25 16:47:21 +10:00
parent 34ac45bd13
commit 60ff14d6b7

View File

@@ -18,10 +18,7 @@ def restore_service(machine: Machine, name: str, provider: str, service: str) ->
msg = f"Service {service} not found in configuration. Available services are: {', '.join(backup_folders.keys())}"
raise ClanError(msg)
folders = backup_folders[service]["folders"].values()
assert all(isinstance(f, str) for f in folders), (
f"folders must be a list of strings instead of {folders}"
)
folders = backup_folders[service]["folders"]
env = {}
env["NAME"] = name
# FIXME: If we have too many folder this might overflow the stack.