From 7802454029f5ac997679d0da82435d112f119357 Mon Sep 17 00:00:00 2001 From: Wiktor Mazur Date: Sun, 29 Mar 2020 14:13:53 +0200 Subject: [PATCH] Fixed: config file cache --- application/src/utils/config.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/application/src/utils/config.py b/application/src/utils/config.py index a920b90..80829da 100644 --- a/application/src/utils/config.py +++ b/application/src/utils/config.py @@ -45,10 +45,10 @@ def config(): cfg = toml.load(cfg_file) if cfg['config']['version'] != CFG_VERSION: raise Exception('Version changed') - return cfg - except(Exception) as e: + _config = cfg + except(Exception) as _: with open(conf_file, "w") as cfg_file: cfg_file.write(default) - return toml.loads(default) + _config = toml.loads(default) - return {} + return _config \ No newline at end of file