diff options
Diffstat (limited to 'modules/options.py')
-rw-r--r-- | modules/options.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/options.py b/modules/options.py index 503b40e9..35ccade2 100644 --- a/modules/options.py +++ b/modules/options.py @@ -198,6 +198,8 @@ class Options: try:
with open(filename, "r", encoding="utf8") as file:
self.data = json.load(file)
+ except FileNotFoundError:
+ self.data = {}
except Exception:
errors.report(f'\nCould not load settings\nThe config file "{filename}" is likely corrupted\nIt has been moved to the "tmp/config.json"\nReverting config to default\n\n''', exc_info=True)
os.replace(filename, os.path.join(script_path, "tmp", "config.json"))
|