From 9d739f26ec83d5e1dd4125dde5bcb07ec74374c4 Mon Sep 17 00:00:00 2001 From: imarom Date: Thu, 10 Mar 2016 17:29:23 +0200 Subject: [PATCH] a minor fix --- .../automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py index 8d083b89..bb877586 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py @@ -895,7 +895,10 @@ class CRxStats(CTRexStats): pg_current['rx_pps'] = self.calc_pps(prev_rx_pps, now_rx_pkts, prev_rx_pkts, diff_sec) pg_current['rx_bps'] = self.calc_bps(prev_rx_bps, now_rx_bytes, prev_rx_bytes, diff_sec) - pg_current['tx_bps_L1'] = calc_bps_L1(pg_current['tx_bps'], pg_current['tx_pps']) + if pg_current['tx_bps'] != None and pg_current['tx_pps'] != None: + pg_current['tx_bps_L1'] = calc_bps_L1(pg_current['tx_bps'], pg_current['tx_pps']) + else: + pg_current['tx_bps_L1'] = None def calc_pps (self, prev_bw, now, prev, diff_sec): -- 2.16.6