fix loglevel parsing

This commit is contained in:
Robert Kaussow 2019-04-11 11:01:22 +02:00
parent 5d805d11c8
commit 885332042b

View File

@ -81,8 +81,8 @@ class Settings(object):
with utils.open_file(config) as stream: with utils.open_file(config) as stream:
s = stream.read() s = stream.read()
sdict = utils.safe_load(s) sdict = utils.safe_load(s)
sdict["logging"]["level"] = sdict["logging"]["level"].upper()
if self._validate(sdict): if self._validate(sdict):
sdict["logging"]["level"] = sdict["logging"]["level"].upper()
anyconfig.merge(defaults, sdict, ac_merge=anyconfig.MS_DICTS) anyconfig.merge(defaults, sdict, ac_merge=anyconfig.MS_DICTS)
if cli_options and self._validate(cli_options): if cli_options and self._validate(cli_options):
@ -100,7 +100,7 @@ class Settings(object):
"exclude_files": [] "exclude_files": []
}, },
"logging": { "logging": {
"level": logging.getLevelName(30), "level": "WARNING",
"json": False "json": False
}, },
"ansible": { "ansible": {