mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-20 11:58:55 +00:00
fw/parsers: Ensure that a section is a valid dict
Ensure that all section entries are valid dicts otherwise raise an error informing the user.
This commit is contained in:
parent
52243a5804
commit
b15b937863
@ -140,6 +140,9 @@ class AgendaParser(object):
|
||||
sections = raw.pop("sections", [])
|
||||
if not isinstance(sections, list):
|
||||
raise ConfigError('Invalid entry "sections" - must be a list')
|
||||
for section in sections:
|
||||
if not hasattr(section, 'items'):
|
||||
raise ConfigError('Invalid section "{}" - must be a dict'.format(section))
|
||||
return sections
|
||||
|
||||
def _pop_workloads(self, raw):
|
||||
|
Loading…
x
Reference in New Issue
Block a user