From 5de87231327af2b564a079b939a3a2c68c0a51ba Mon Sep 17 00:00:00 2001 From: RemixDev Date: Thu, 27 Feb 2020 18:49:35 +0100 Subject: [PATCH] made config file more readable --- deemix/app/settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deemix/app/settings.py b/deemix/app/settings.py index c744c2f..c775fd1 100644 --- a/deemix/app/settings.py +++ b/deemix/app/settings.py @@ -19,7 +19,7 @@ def initSettings(): defaultSettings = json.load(d) if not path.isfile(path.join(configFolder, 'config.json')): with open(path.join(configFolder, 'config.json'), 'w') as f: - f.write(json.dumps(defaultSettings)) + json.dump(f, defaultSettings, indent=2) with open(path.join(configFolder, 'config.json'), 'r') as configFile: settings = json.load(configFile) settingsCheck() @@ -38,7 +38,7 @@ def saveSettings(newSettings): global settings settings = newSettings with open(path.join(localpaths.getConfigFolder(), 'config.json'), 'w') as configFile: - json.dump(settings, configFile) + json.dump(settings, configFile, indent=2) return True def settingsCheck():