Prettify JSON dump

This commit is contained in:
googan-star 2019-10-02 10:55:50 +00:00 committed by GitHub
parent f3492149c6
commit 79e33ff2da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -199,7 +199,7 @@ class Settings(object):
Save settings to file.
"""
self.common.log('Settings', 'save')
open(self.filename, 'w').write(json.dumps(self._settings))
open(self.filename, 'w').write(json.dumps(self._settings, indent=2))
self.common.log('Settings', 'save', 'Settings saved in {}'.format(self.filename))
def get(self, key):