From a4ff0d4c8835e113f8376c9db7a4d181c821bdaf Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 17 Mar 2023 16:38:54 +0200 Subject: [PATCH] fix annoying 500 error --- files/helpers/settings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/helpers/settings.py b/files/helpers/settings.py index 4dbdff358..c39b4fa08 100644 --- a/files/helpers/settings.py +++ b/files/helpers/settings.py @@ -36,7 +36,8 @@ 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) + if f.read(): + _SETTINGS = json.load(f) def _save_settings(): with open(SETTINGS_FILENAME, "w", encoding='utf_8') as f: