summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/common/trex_exceptions.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/automation/trex_control_plane/common/trex_exceptions.py')
-rwxr-xr-xscripts/automation/trex_control_plane/common/trex_exceptions.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/automation/trex_control_plane/common/trex_exceptions.py b/scripts/automation/trex_control_plane/common/trex_exceptions.py
index a2a64e19..1353fd00 100755
--- a/scripts/automation/trex_control_plane/common/trex_exceptions.py
+++ b/scripts/automation/trex_control_plane/common/trex_exceptions.py
@@ -17,13 +17,13 @@ class RPCError(Exception):
self.data = remote_data
self.args = (code, self.msg, remote_data)
- def __str__(self):
- return self.__repr__()
- def __repr__(self):
- if self.args[2] is not None:
- return u"[errcode:%r] %r. Extended data: %r" % (self.args[0], self.args[1], self.args[2])
- else:
- return u"[errcode:%r] %r" % (self.args[0], self.args[1])
+ def __str__(self):
+ return self.__repr__()
+ def __repr__(self):
+ if self.args[2] is not None:
+ return u"[errcode:%r] %r. Extended data: %r" % (self.args[0], self.args[1], self.args[2])
+ else:
+ return u"[errcode:%r] %r" % (self.args[0], self.args[1])
class TRexException(RPCError):
"""