From bfb15053ea5d21bc0502f3102cd83407fafddf75 Mon Sep 17 00:00:00 2001 From: imarom Date: Tue, 15 Dec 2015 04:26:21 -0500 Subject: moved all return code values to RC types (better for batch rc) also few fixes --- scripts/automation/trex_control_plane/common/trex_types.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scripts/automation/trex_control_plane/common') 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: -- cgit 1.2.3-korg