config: Debug log ignored sections (fixes: #694)

This commit is contained in:
Thomas Adamcik 2015-02-25 21:02:57 +01:00
parent 7520b13aa1
commit 0ea3969427

View File

@ -175,6 +175,7 @@ def _validate(raw_config, schemas):
# Get validated config
config = {}
errors = {}
sections = set(raw_config)
for schema in schemas:
values = raw_config.get(schema.name, {})
result, error = schema.deserialize(values)
@ -182,6 +183,12 @@ def _validate(raw_config, schemas):
errors[schema.name] = error
if result:
config[schema.name] = result
if schema.name in sections:
sections.remove(schema.name)
for section in sections:
logger.debug('Ignoring unknown config section: %s', section)
return config, errors