From: Philippe Proulx Date: Mon, 14 Mar 2016 19:55:46 +0000 (-0400) Subject: Fix: config: check for trace object's "byte-order" node type X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=005f93d91337e5d4d4ec814d3f9845ccffc545d0;p=deliverable%2Fbarectf.git Fix: config: check for trace object's "byte-order" node type Signed-off-by: Philippe Proulx --- diff --git a/barectf/config.py b/barectf/config.py index 736b070..22038eb 100644 --- a/barectf/config.py +++ b/barectf/config.py @@ -1170,7 +1170,12 @@ class _YamlConfigParser: if 'byte-order' not in trace_node: raise ConfigError('missing "byte-order" property (trace)') - self._bo = _byte_order_str_to_bo(trace_node['byte-order']) + bo_node = trace_node['byte-order'] + + if not _is_str_prop(bo_node): + raise ConfigError('"byte-order" property of trace object must be a string ("le" or "be")') + + self._bo = _byte_order_str_to_bo(bo_node) if self._bo is None: raise ConfigError('invalid "byte-order" property (trace): must be "le" or "be"')