summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-03-13 17:37:36 +0200
committerimarom <imarom@cisco.com>2016-03-13 17:37:36 +0200
commitd935f8e440051b703175ea47077d51873f4d9504 (patch)
tree7df18e06f46b4b278a16bb94504b6c9438423d17 /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
parent17e720ee8611d950c56e3a873f0ac9cd2b235279 (diff)
removed some prints and a fix for error handling on add_streams
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py')
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
index 1ffeffe0..ab368d70 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
@@ -229,7 +229,7 @@ class Port(object):
ret = RC()
for i, single_rc in enumerate(rc):
- if single_rc:
+ if single_rc.rc:
stream_id = batch[i].params['stream_id']
next_id = batch[i].params['stream']['next_stream_id']
self.streams[stream_id] = {'next_id' : next_id,
@@ -238,11 +238,12 @@ class Port(object):
'rate' : streams_list[i].get_rate()}
ret.add(RC_OK(data = stream_id))
-
+ else:
+ ret.add(RC(*single_rc))
self.state = self.STATE_STREAMS if (len(self.streams) > 0) else self.STATE_IDLE
- return ret if rc else self.err(str(rc))
+ return ret if ret else self.err(str(ret))