Revert "Optionally show exception text"

This reverts commit 79e4b78f7c.
main
bashrc 2026-04-26 17:18:05 +01:00
parent e5da666d70
commit 94a26e6ff8
1 changed files with 2 additions and 6 deletions

View File

@ -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