From 9bcce283969c5ca5faea455f8d4a4a718c7f65bb Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Mon, 14 Mar 2016 18:00:50 -0400 Subject: [PATCH] Fix: config: check for unknown props in enum type member object Signed-off-by: Philippe Proulx --- barectf/config.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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)) -- 2.34.1