From 859a72101c94a26296efcc713882b472caf6ff8e Mon Sep 17 00:00:00 2001 From: Dan Klein Date: Fri, 8 Jan 2016 13:55:24 +0200 Subject: minor updates --- .../client/trex_stateless_client.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (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 6139884d..42d5031e 100755 --- a/scripts/automation/trex_control_plane/client/trex_stateless_client.py +++ b/scripts/automation/trex_control_plane/client/trex_stateless_client.py @@ -1065,8 +1065,8 @@ class CTRexStatelessClient(object): "streams", self.cmd_streams_line.__doc__, parsing_opts.PORT_LIST_WITH_ALL, - parsing_opts.STREAMS_MASK, - parsing_opts.FULL_OUTPUT) + parsing_opts.STREAMS_MASK)#, + #parsing_opts.FULL_OUTPUT) opts = parser.parse_args(line.split()) @@ -1074,14 +1074,18 @@ class CTRexStatelessClient(object): return RC_ERR("bad command line parameters") streams = self.cmd_streams(opts.ports, set(opts.streams)) + if not streams: + # we got no streams running - # print stats to screen - for stream_hdr, port_streams_data in streams.iteritems(): - text_tables.print_table_with_header(port_streams_data.text_table, - header= stream_hdr.split(":")[0] + ":", - untouched_header= stream_hdr.split(":")[1]) - - return RC_OK() + print format_text("No streams found with desired filter.\n", "bold", "magenta") + return RC_ERR("No streams found with desired filter.") + else: + # print stats to screen + for stream_hdr, port_streams_data in streams.iteritems(): + text_tables.print_table_with_header(port_streams_data.text_table, + header= stream_hdr.split(":")[0] + ":", + untouched_header= stream_hdr.split(":")[1]) + return RC_OK() -- cgit 1.2.3-korg