summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/client/trex_stateless_client.py
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2015-12-16 20:54:04 +0200
committerHanoh Haim <hhaim@cisco.com>2015-12-16 20:54:04 +0200
commit3f6e247e9ed29e9dbf61dffadfb2a86c2284987e (patch)
tree37d6f894ba5714fc261090f318959f076c1fe4ca /scripts/automation/trex_control_plane/client/trex_stateless_client.py
parent9c225132ef8dcbb6dff9aa0221a5b76328a7f75f (diff)
add tuple gen command and yaml example
Diffstat (limited to 'scripts/automation/trex_control_plane/client/trex_stateless_client.py')
-rwxr-xr-xscripts/automation/trex_control_plane/client/trex_stateless_client.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/automation/trex_control_plane/client/trex_stateless_client.py b/scripts/automation/trex_control_plane/client/trex_stateless_client.py
index 75c1c06f..a76b1f9f 100755
--- a/scripts/automation/trex_control_plane/client/trex_stateless_client.py
+++ b/scripts/automation/trex_control_plane/client/trex_stateless_client.py
@@ -899,6 +899,7 @@ class CTRexStatelessClient(object):
opts = parser.parse_args(line.split())
+
if opts is None:
return RC_ERR("bad command line parameters")
@@ -915,7 +916,15 @@ class CTRexStatelessClient(object):
else:
# load streams from file
- stream_list = self.streams_db.load_yaml_file(opts.file[0])
+ stream_list = None;
+ try:
+ stream_list = self.streams_db.load_yaml_file(opts.file[0])
+ except Exception as e:
+ s = str(e)
+ rc=RC_ERR("Failed to load stream pack")
+ rc.annotate()
+ return rc
+
rc = RC(stream_list != None)
rc.annotate("Load stream pack (from file):")
if stream_list == None: