From 676a7ea9ebf5a7b483ece3409d755a376d5e45b0 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 19 May 2026 06:04:45 +0900 Subject: [PATCH] fix: notes file may not be present --- dzgui/managers/notes.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dzgui/managers/notes.py b/dzgui/managers/notes.py index 73beaa6..8782fb4 100644 --- a/dzgui/managers/notes.py +++ b/dzgui/managers/notes.py @@ -20,7 +20,10 @@ logger = logging.getLogger(APP_NAME) class NoteManager: def __init__(self, controller: "Controller", path: "Path") -> None: self.notes_path = path - self.cache: dict[str, str] = read_json(self.notes_path) + try: + self.cache: dict[str, str] = read_json(self.notes_path) + except Exception: + self.cache = {} def add_note(self, server: str, note: str) -> None: self.cache[server] = note