From 278bd7a30a79601ee00e4c55476308393534fd0e Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Thu, 17 Mar 2016 18:06:42 -0400 Subject: [PATCH] config: trace object: null sets prop to default value Signed-off-by: Philippe Proulx --- barectf/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: -- 2.34.1