diff options
author | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-12-18 20:11:31 +0200 |
---|---|---|
committer | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-12-19 11:23:48 +0200 |
commit | 5cfeb192a3ff47c5cacc21abe20db2f61a66dd2b (patch) | |
tree | 57a455e70d9ac9c453495f4929ac9fac5b9fb011 /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_types.py | |
parent | cc4bd93b660505a7c9d8e370a1220377907fa6d2 (diff) |
changes from code review
Change-Id: I628608643d902bd6310b04b8036fc5f1fcc42309
Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_types.py')
-rw-r--r-- | scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_types.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_types.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_types.py index 5ae3cb27..a60a7ede 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_types.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_types.py @@ -60,11 +60,10 @@ class RC(): show_count = 10 err_list = [] err_count = 0 - for x in self.rc_list: - if x.data and not x.rc: - err_count += 1 - if len(err_list) < show_count: - err_list.append(format_text(x.data, 'bold')) + for x in filter(len, listify(self.err())): + err_count += 1 + if len(err_list) < show_count: + err_list.append(format_text(x, 'bold')) s = '\n' if len(err_list) > 1 else '' if err_count > show_count: s += format_text('Occurred %s errors, showing first %s:\n' % (err_count, show_count), 'bold') |