simplify clan uri further

This commit is contained in:
Jörg Thalheim
2024-07-02 12:47:01 +02:00
parent ae8cff57aa
commit cc3f99bfaa
5 changed files with 32 additions and 82 deletions

View File

@@ -82,7 +82,7 @@ def add_all_to_history(uri: ClanURI) -> list[HistoryEntry]:
def add_history(uri: ClanURI) -> HistoryEntry:
user_history_file().parent.mkdir(parents=True, exist_ok=True)
history = list_history()
new_entry = _add_maschine_to_history_list(uri.get_url(), uri.machine.name, history)
new_entry = _add_maschine_to_history_list(uri.get_url(), uri.machine_name, history)
write_history_file(history)
return new_entry

View File

@@ -30,7 +30,7 @@ def update_history() -> list[HistoryEntry]:
url=str(entry.flake.flake_url),
machine_name=entry.flake.flake_attr,
)
flake = inspect_flake(uri.get_url(), uri.machine.name)
flake = inspect_flake(uri.get_url(), uri.machine_name)
flake.flake_url = str(flake.flake_url)
entry = HistoryEntry(
flake=flake, last_used=datetime.datetime.now().isoformat()