From: Philippe Proulx Date: Thu, 17 Mar 2016 22:06:42 +0000 (-0400) Subject: config: trace object: null sets prop to default value X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=278bd7a30a79601ee00e4c55476308393534fd0e;p=deliverable%2Fbarectf.git config: trace object: null sets prop to default value Signed-off-by: Philippe Proulx --- diff --git a/barectf/config.py b/barectf/config.py index 2f530a7..55ffdf2 100644 --- a/barectf/config.py +++ b/barectf/config.py @@ -2100,7 +2100,7 @@ class _YamlConfigParser: trace.byte_order = self._bo # UUID - if 'uuid' in trace_node: + if 'uuid' in trace_node and trace_node['uuid'] is not None: uuidp = trace_node['uuid'] if not _is_str_prop(uuidp): @@ -2117,7 +2117,7 @@ class _YamlConfigParser: trace.uuid = uuidp # packet header type - if 'packet-header-type' in trace_node: + if 'packet-header-type' in trace_node and trace_node['packet-header-type'] is not None: try: ph_type = self._create_type(trace_node['packet-header-type']) except Exception as e: