fix last commit

master
Aevann 2023-03-17 16:48:38 +02:00
parent 8f5ed6f8a5
commit 0e4f886d92
1 changed files with 3 additions and 1 deletions

View File

@ -36,7 +36,9 @@ def reload_settings():
if not os.path.isfile(SETTINGS_FILENAME): if not os.path.isfile(SETTINGS_FILENAME):
_save_settings() _save_settings()
with open(SETTINGS_FILENAME, 'r', encoding='utf_8') as f: 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(): def _save_settings():
with open(SETTINGS_FILENAME, "w", encoding='utf_8') as f: with open(SETTINGS_FILENAME, "w", encoding='utf_8') as f: