From df16bc6ec9499a7343c856f20906cff7b58e3f59 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Mon, 14 Mar 2016 17:10:22 -0400 Subject: [PATCH] Fix: config: check unknown props in float type object size Signed-off-by: Philippe Proulx --- barectf/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/barectf/config.py b/barectf/config.py index e3b27af..9c1a7bd 100644 --- a/barectf/config.py +++ b/barectf/config.py @@ -1375,7 +1375,10 @@ class _YamlConfigParser: if not _is_assoc_array_prop(size): raise ConfigError('"size" property of floating point number type object must be an associative array') - unk_prop = _get_first_unknown_prop(node, ['exp', 'mant']) + unk_prop = _get_first_unknown_prop(size, ['exp', 'mant']) + + if unk_prop: + raise ConfigError('unknown floating point number type object\'s "size" property: "{}"'.format(unk_prop)) if 'exp' in size: exp = size['exp'] -- 2.34.1