summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-02-09 09:02:04 -0500
committerimarom <imarom@cisco.com>2016-02-09 09:10:23 -0500
commita94f1cdde418a7e96fce6f9c5ec52da5bafbd4b9 (patch)
tree856a6b21ec5ee2ba16fdcc1ec721f0b6e0c8e087 /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py
parente8ba50a8940c1288011b434bb1a7df2159578d67 (diff)
YAML profiles fixup
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