do not instantiate vars_generators several times

We should really not have any property that has side effects i.e.
spawning processes.
This commit is contained in:
Jörg Thalheim
2025-05-14 09:09:40 +02:00
parent d397c8ad39
commit 1ff5d64a78
9 changed files with 25 additions and 23 deletions

View File

@@ -91,7 +91,7 @@ def flash_machine(
"users": {"root": {"openssh": {"authorizedKeys": {"keys": root_keys}}}}
}
for generator in machine.vars_generators:
for generator in machine.vars_generators():
for file in generator.files:
if file.needed_for == "partitioning":
msg = f"Partitioning time secrets are not supported with `clan flash write`: clan.core.vars.generators.{generator.name}.files.{file.name}"