clan-cli: Fix disko template to not fail because of missing bootloader.

This commit is contained in:
Qubasa
2025-02-10 12:38:04 +07:00
parent 9ab81a9c5d
commit 2663a181d0
2 changed files with 15 additions and 1 deletions

View File

@@ -138,6 +138,7 @@ def set_machine_disk_schema(
# Use get disk schemas to get the placeholders and their options
placeholders: dict[str, str],
force: bool = False,
allow_uknown_placeholders: bool = False,
) -> None:
"""
Set the disk placeholders of the template
@@ -182,7 +183,11 @@ def set_machine_disk_schema(
)
# Invalid value. Check if the value is one of the provided options
if ph.options and placeholder_value not in ph.options:
if (
ph.options
and placeholder_value not in ph.options
and not allow_uknown_placeholders
):
msg = (
f"Invalid value {placeholder_value} for placeholder {placeholder_name}"
)