summaryrefslogtreecommitdiffstats
path: root/girok/utils/general.py
diff options
context:
space:
mode:
Diffstat (limited to 'girok/utils/general.py')
-rw-r--r--girok/utils/general.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/girok/utils/general.py b/girok/utils/general.py
index da6e96a..3791897 100644
--- a/girok/utils/general.py
+++ b/girok/utils/general.py
@@ -7,6 +7,11 @@ def config_setup(APP_DIR, CONFIG_PATH):
if not os.path.isdir(APP_DIR):
os.makedirs(APP_DIR)
write_json(CONFIG_PATH, {"mode": "off"})
+ else:
+ cfg = read_json(CONFIG_PATH)
+ if 'mode' not in cfg:
+ write_json(CONFIG_PATH, {"mode": "off"})
+
def read_json(fpath):