summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py')
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py
index 1252b752..9cea3ea8 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py
@@ -140,7 +140,14 @@ class STLSim(object):
# handle YAMLs
for input_file in input_files:
- stream_list += STLClient.load_profile(input_file)
+ try:
+ profile = STLProfile.load(input_file)
+ except STLError as e:
+ print format_text("\nError while loading profile '{0}'\n".format(input_file), 'bold')
+ print e.brief() + "\n"
+ return
+
+ stream_list += profile.get_streams()
# load streams