From: Philippe Proulx Date: Mon, 14 Mar 2016 22:00:50 +0000 (-0400) Subject: Fix: config: check for unknown props in enum type member object X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=9bcce283969c5ca5faea455f8d4a4a718c7f65bb;p=deliverable%2Fbarectf.git Fix: config: check for unknown props in enum type member object Signed-off-by: Philippe Proulx --- diff --git a/barectf/config.py b/barectf/config.py index ae0a77f..a5ff54c 100644 --- a/barectf/config.py +++ b/barectf/config.py @@ -1470,6 +1470,14 @@ class _YamlConfigParser: value = (cur, cur) cur += 1 else: + unk_prop = _get_first_unknown_prop(m_node, [ + 'label', + 'value', + ]) + + if unk_prop: + raise ConfigError('unknown enumeration type member object property: "{}"'.format(unk_prop)) + if 'label' not in m_node: raise ConfigError('missing "label" property in enumeration member #{}'.format(index))