Fix: config: check unknown props in float type object size
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 14 Mar 2016 21:10:22 +0000 (17:10 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 17 Mar 2016 16:38:11 +0000 (12:38 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
barectf/config.py

index e3b27af2f96c3e93369e4eab310f377a6c228f32..9c1a7bd5f21330808db0d123d726f56f7e43ff3b 100644 (file)
@@ -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']
This page took 0.024335 seconds and 4 git commands to generate.