From 94a26e6ff8007b6ccebee7c1ce1b23d522276490 Mon Sep 17 00:00:00 2001 From: bashrc Date: Sun, 26 Apr 2026 17:18:05 +0100 Subject: [PATCH] Revert "Optionally show exception text" This reverts commit 79e4b78f7c9408187cab0d86dab9839529cfb136. --- data.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/data.py b/data.py index 10081ae31..16fb75f8d 100644 --- a/data.py +++ b/data.py @@ -16,9 +16,7 @@ def _store_base(text: str, filename: str, exception_text: str, with open(filename, mode, encoding='utf-8') as fp: fp.write(text) return True - except OSError as exc: - if '[ex]' in exception_text: - exception_text = exception_text.replace('[ex]', str(exc)) + except OSError: print(exception_text) return False @@ -30,9 +28,7 @@ def load_string(filename: str, exception_text: str) -> str: with open(filename, 'r', encoding='utf-8') as fp: text = fp.read() return text - except OSError as exc: - if '[ex]' in exception_text: - exception_text = exception_text.replace('[ex]', str(exc)) + except OSError: print(exception_text) return None