diff options
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: |