1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-20 20:09:11 +00:00

AgendaPaser: fix duplicate source error

When both global and config sections are present in an agenda, they both
will be processed by the ConfigManager. In each case, the path to the
agenda file was specified as the source, which resulted ConfigManager
complaining that the same source is being added twice. To avoid that,
the source is now suffixed with the section name.
This commit is contained in:
Sergei Trofimov 2017-06-27 09:55:16 +01:00
parent a7bed9980e
commit d68bc49427

View File

@ -114,7 +114,7 @@ class AgendaParser(object):
if 'run_name' in entry:
state.run_config.set('run_name', entry.pop('run_name'))
state.load_config(entry, source, wrap_exceptions=False)
state.load_config(entry, '{}/{}'.format(source, name), wrap_exceptions=False)
def _pop_sections(self, raw):
sections = raw.pop("sections", [])