diff options
author | imarom <imarom@cisco.com> | 2015-12-15 04:26:21 -0500 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2015-12-15 04:26:21 -0500 |
commit | bfb15053ea5d21bc0502f3102cd83407fafddf75 (patch) | |
tree | 05a074089fefd23c59c6319612f5114dee98330d /scripts/automation/trex_control_plane/common | |
parent | d71dbce9695f348b2e52e00c9efd53cb89c62aa5 (diff) |
moved all return code values to RC types (better for batch rc)
also few fixes
Diffstat (limited to 'scripts/automation/trex_control_plane/common')
-rw-r--r-- | scripts/automation/trex_control_plane/common/trex_types.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/automation/trex_control_plane/common/trex_types.py b/scripts/automation/trex_control_plane/common/trex_types.py index 3de36e4c..7c3f04c5 100644 --- a/scripts/automation/trex_control_plane/common/trex_types.py +++ b/scripts/automation/trex_control_plane/common/trex_types.py @@ -31,10 +31,12 @@ class RC(): return not self.good() def data (self): - return [x.data if x.rc else "" for x in self.rc_list] + d = [x.data if x.rc else "" for x in self.rc_list] + return (d if len(d) > 1 else d[0]) def err (self): - return [x.data if not x.rc else "" for x in self.rc_list] + e = [x.data if not x.rc else "" for x in self.rc_list] + return (e if len(e) > 1 else e[0]) def annotate (self, desc = None, show_status = True): if desc: |