From b273cc9c6a2b3dff87cc662f72910ea730c39adf Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Sun, 21 Sep 2025 17:33:35 +0200 Subject: [PATCH] clan_lib: temporarily allow missing paths again --- pkgs/clan-cli/clan_lib/persist/path_utils.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/clan-cli/clan_lib/persist/path_utils.py b/pkgs/clan-cli/clan_lib/persist/path_utils.py index 9a06f61af..408d995cd 100644 --- a/pkgs/clan-cli/clan_lib/persist/path_utils.py +++ b/pkgs/clan-cli/clan_lib/persist/path_utils.py @@ -95,11 +95,12 @@ def delete_by_path_tuple(d: dict[str, Any], path: PathTuple) -> Any: last_key = keys[-1] try: value = current.pop(last_key) - except KeyError as exc: + except KeyError: + # TODO(@hsjobeki): It should be save to raise an error here. # Possibly data was already deleted - msg = f"Canot delete. Path '{path}' not found in data '{d}'" - raise KeyError(msg) from exc - # return {} + # msg = f"Canot delete. Path '{path}' not found in data '{d}'" + # raise KeyError(msg) from exc + return {} else: return {last_key: value}