config: trace object: null sets prop to default value
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 17 Mar 2016 22:06:42 +0000 (18:06 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 18 Mar 2016 21:55:00 +0000 (17:55 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
barectf/config.py

index 2f530a7dd28568a6e5b9ab60e97b38b7d8d2701e..55ffdf2fa246ab6b18bfaa349562e8f816a1000c 100644 (file)
@@ -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:
This page took 0.025288 seconds and 4 git commands to generate.