1
0
mirror of synced 2024-11-12 00:40:50 +01:00

dbutils: fix config loading incorrectly

This commit is contained in:
Kevin Trocolli 2023-04-15 03:06:11 -04:00
parent 9895068125
commit 83d2151b6b

View File

@ -33,7 +33,9 @@ if __name__ == "__main__":
cfg = CoreConfig() cfg = CoreConfig()
if path.exists(f"{args.config}/core.yaml"): 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): if not path.exists(cfg.server.log_dir):
mkdir(cfg.server.log_dir) mkdir(cfg.server.log_dir)
@ -44,7 +46,6 @@ if __name__ == "__main__":
) )
exit(1) exit(1)
cfg.update({"database": {"loglevel": "info"}}) # Force it to be info if we're doing db work
data = Data(cfg) data = Data(cfg)