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

@@ -105,7 +105,7 @@ def test_add_module_to_inventory(
generator = None
for gen in machine.vars_generators:
for gen in machine.vars_generators():
if gen.name == "borgbackup":
generator = gen
break