vm-manager: Added right click context menu
This commit is contained in:
@@ -9,8 +9,9 @@ from clan_cli.flakes.inspect import FlakeConfig, inspect_flake
|
||||
|
||||
from ..clan_uri import ClanURI
|
||||
from ..dirs import user_history_file
|
||||
from ..locked_open import read_history_file, write_history_file
|
||||
from ..errors import ClanError
|
||||
from ..locked_open import read_history_file, write_history_file
|
||||
|
||||
|
||||
class EnhancedJSONEncoder(json.JSONEncoder):
|
||||
def default(self, o: Any) -> Any:
|
||||
@@ -53,7 +54,8 @@ def list_history() -> list[HistoryEntry]:
|
||||
try:
|
||||
parsed = read_history_file()
|
||||
for i, p in enumerate(parsed.copy()):
|
||||
parsed[i] = merge_dicts(p, p["settings"])
|
||||
# Everything from the settings dict is merged into the flake dict, and can override existing values
|
||||
parsed[i] = merge_dicts(p, p.get("settings", {}))
|
||||
logs = [HistoryEntry(**p) for p in parsed]
|
||||
except (json.JSONDecodeError, TypeError) as ex:
|
||||
raise ClanError(f"History file at {user_history_file()} is corrupted") from ex
|
||||
|
||||
Reference in New Issue
Block a user