diff options
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py')
-rw-r--r-- | scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py index 8ad15a52..9c190dad 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py @@ -271,7 +271,7 @@ class YAMLLoader(object): # hack the VM fields for now if 'vm' in s_obj: - stream.fields['vm'] = s_obj['vm'] + stream.fields['vm'].update(s_obj['vm']) return stream @@ -281,7 +281,11 @@ class YAMLLoader(object): # read YAML and pass it down to stream object yaml_str = f.read() - objects = yaml.load(yaml_str) + try: + objects = yaml.load(yaml_str) + except yaml.parser.ParserError as e: + raise STLError(str(e)) + streams = [self.__parse_stream(object) for object in objects] return streams |