Refactor(clanInternals): remove depending on clanInternals.inventory

This commit is contained in:
Johannes Kirschbauer
2025-06-10 17:43:03 +02:00
parent 78e719f5fb
commit 80ead1bf4d
2 changed files with 3 additions and 3 deletions

View File

@@ -358,9 +358,9 @@ def test_caching_works(flake: ClanFlake) -> None:
my_flake, "get_from_nix", wraps=my_flake.get_from_nix
) as tracked_build:
assert tracked_build.call_count == 0
my_flake.select("clanInternals.inventory.meta")
my_flake.select("clanInternals.inventoryClass.inventory.meta")
assert tracked_build.call_count == 1
my_flake.select("clanInternals.inventory.meta")
my_flake.select("clanInternals.inventoryClass.inventory.meta")
assert tracked_build.call_count == 1

View File

@@ -63,7 +63,7 @@ class Machine:
def _class_(self) -> str:
try:
return self.flake.select(
f'clanInternals.inventory.machines."{self.name}".machineClass'
f'clanInternals.inventoryClass.inventory.machines."{self.name}".machineClass'
)
except ClanCmdError as e:
if re.search(f"error: attribute '{self.name}' missing", e.cmd.stderr):