tests: fix NoneType printing if VPP died early
Make error message more meaningful. Type: fix Change-Id: I3c49cb179c3ee7a59657b3ae9a06311f57dc52ac Signed-off-by: Klement Sekera <ksekera@cisco.com>
This commit is contained in:

committed by
Neale Ranns

parent
45723b8d30
commit
79a31db11d
@ -106,13 +106,16 @@ class VppDiedError(Exception):
|
||||
if testcase is None and method_name is None:
|
||||
in_msg = ''
|
||||
else:
|
||||
in_msg = 'running %s.%s ' % (testcase, method_name)
|
||||
in_msg = ' while running %s.%s' % (testcase, method_name)
|
||||
|
||||
msg = "VPP subprocess died %sunexpectedly with return code: %d%s." % (
|
||||
in_msg,
|
||||
self.rv,
|
||||
' [%s]' % (self.signal_name if
|
||||
if self.rv:
|
||||
msg = "VPP subprocess died unexpectedly%s with return code: %d%s."\
|
||||
% (in_msg, self.rv, ' [%s]' %
|
||||
(self.signal_name if
|
||||
self.signal_name is not None else ''))
|
||||
else:
|
||||
msg = "VPP subprocess died unexpectedly%s." % in_msg
|
||||
|
||||
super(VppDiedError, self).__init__(msg)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user