From 87f347870f0fbcc3bf75f7e385ec90b4060763e1 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 19 May 2026 23:41:51 +0900 Subject: [PATCH] chore: clean up try/except block --- dzgui/util/_json.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dzgui/util/_json.py b/dzgui/util/_json.py index bc8f70e..58faa93 100644 --- a/dzgui/util/_json.py +++ b/dzgui/util/_json.py @@ -2,15 +2,13 @@ import json from pathlib import Path from typing import Any + def read_json(path: Path) -> Any: try: with open(path, "r") as infile: - try: - data = json.load(infile) - return data - except json.decoder.JSONDecodeError as e: - raise e - except OSError as e: + data = json.load(infile) + return data + except Exception as e: raise e