From 3f6e247e9ed29e9dbf61dffadfb2a86c2284987e Mon Sep 17 00:00:00 2001 From: Hanoh Haim Date: Wed, 16 Dec 2015 20:54:04 +0200 Subject: add tuple gen command and yaml example --- .../trex_control_plane/client/trex_stateless_client.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'scripts/automation/trex_control_plane/client/trex_stateless_client.py') 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: -- cgit 1.2.3-korg