vars/get: use machine_name as variable name

This commit is contained in:
Jörg Thalheim
2024-11-14 13:16:32 +01:00
committed by Mic92
parent 91d2018bb7
commit 673717fe8c

View File

@@ -41,9 +41,9 @@ def get_var(machine: Machine, var_id: str) -> Var:
raise ClanError(msg) raise ClanError(msg)
def get_command(machine: str, var_id: str, flake: FlakeId) -> None: def get_command(machine_name: str, var_id: str, flake: FlakeId) -> None:
_machine = Machine(name=machine, flake=flake) machine = Machine(name=machine_name, flake=flake)
var = get_var(_machine, var_id) var = get_var(machine, var_id)
if not var.exists: if not var.exists:
msg = f"Var {var.id} has not been generated yet" msg = f"Var {var.id} has not been generated yet"
raise ClanError(msg) raise ClanError(msg)
@@ -57,7 +57,7 @@ def _get_command(
args: argparse.Namespace, args: argparse.Namespace,
) -> None: ) -> None:
get_command( get_command(
machine=args.machine, machine_name=args.machine,
var_id=args.var_id, var_id=args.var_id,
flake=args.flake, flake=args.flake,
) )