Machine __str__ impl

This commit is contained in:
Qubasa
2024-01-30 15:32:35 +07:00
parent deae5c6168
commit e7668f6e41
2 changed files with 9 additions and 3 deletions

View File

@@ -31,6 +31,12 @@ class Machine:
if deployment_info is not None:
self.deployment_info = deployment_info
def __str__(self) -> str:
return f"Machine(name={self.name}, flake={self.flake})"
def __repr__(self) -> str:
return str(self)
def get_deployment_info(self) -> None:
self.deployment_info = json.loads(
self.build_nix("config.system.clan.deployment.file").read_text()