From 0e4f886d92f9179e090eb207c2923443855167a0 Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 17 Mar 2023 16:48:38 +0200 Subject: [PATCH] fix last commit --- files/helpers/settings.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/helpers/settings.py b/files/helpers/settings.py index 4dbdff358..c3135bfca 100644 --- a/files/helpers/settings.py +++ b/files/helpers/settings.py @@ -36,7 +36,9 @@ def reload_settings(): if not os.path.isfile(SETTINGS_FILENAME): _save_settings() with open(SETTINGS_FILENAME, 'r', encoding='utf_8') as f: - _SETTINGS = json.load(f) + x = f.read() + if x: + _SETTINGS = json.loads(x) def _save_settings(): with open(SETTINGS_FILENAME, "w", encoding='utf_8') as f: