This commit is contained in:
Qubasa
2023-12-02 00:15:55 +01:00
parent 6936156630
commit ece06cb266
2 changed files with 4 additions and 4 deletions

View File

@@ -42,14 +42,14 @@ class VMBase:
def run(self) -> None: def run(self) -> None:
print(f"Running VM {self.name}") print(f"Running VM {self.name}")
vm = asyncio.run(vms.run.inspect_vm(flake_url=self._path, flake_attr="defaultVM")) vm = asyncio.run(
vms.run.inspect_vm(flake_url=self._path, flake_attr="defaultVM")
)
task = vms.run.run_vm(vm) task = vms.run.run_vm(vm)
for line in task.log_lines(): for line in task.log_lines():
print(line, end="") print(line, end="")
@dataclass(frozen=True) @dataclass(frozen=True)
class VM(VMBase): class VM(VMBase):
autostart: bool = False autostart: bool = False
@@ -89,7 +89,6 @@ def list_vms() -> list[VM]:
), ),
] ]
# TODO: list_history() should return a list of dicts, not a list of paths # TODO: list_history() should return a list of dicts, not a list of paths
# Execute `clan flakes add <path>` to democlan for this to work # Execute `clan flakes add <path>` to democlan for this to work
for path in clan_cli.flakes.history.list_history(): for path in clan_cli.flakes.history.list_history():

View File

@@ -50,6 +50,7 @@ class ClanSelectPage(Gtk.Box):
print(f"on_double_click: {vm}") print(f"on_double_click: {vm}")
vm.run() vm.run()
class ClanSelectButtons(Gtk.Box): class ClanSelectButtons(Gtk.Box):
def __init__( def __init__(
self, self,