From 83d2151b6bf36175805d94ab11bed748106339aa Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Sat, 15 Apr 2023 03:06:11 -0400 Subject: [PATCH] dbutils: fix config loading incorrectly --- dbutils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dbutils.py b/dbutils.py index 14af98e..3be3ebe 100644 --- a/dbutils.py +++ b/dbutils.py @@ -33,7 +33,9 @@ if __name__ == "__main__": cfg = CoreConfig() if path.exists(f"{args.config}/core.yaml"): - cfg.update(yaml.safe_load(open(f"{args.config}/core.yaml"))) + cfg_dict = yaml.safe_load(open(f"{args.config}/core.yaml")) + cfg_dict.get('database', {})['loglevel'] = 'info' + cfg.update(cfg_dict) if not path.exists(cfg.server.log_dir): mkdir(cfg.server.log_dir) @@ -44,7 +46,6 @@ if __name__ == "__main__": ) exit(1) - cfg.update({"database": {"loglevel": "info"}}) # Force it to be info if we're doing db work data = Data(cfg)