From 68df86e2005dc4693b1270a3e663e2450f81fa93 Mon Sep 17 00:00:00 2001 From: Dan Klein Date: Thu, 27 Aug 2015 19:18:16 +0300 Subject: progress in packet builder module --- .../trex_control_plane/common/trex_exceptions.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'scripts/automation/trex_control_plane/common') diff --git a/scripts/automation/trex_control_plane/common/trex_exceptions.py b/scripts/automation/trex_control_plane/common/trex_exceptions.py index 1353fd00..a2a64e19 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): """ -- cgit