Fix return error code when something goes wrong
Change-Id: I6a401ddcf33cf4a337d849616a082232175c0a46
This commit is contained in:
parent
a9eb373e9f
commit
e88b7f77c8
@ -467,15 +467,15 @@ class VmtpTest(object):
|
||||
except KeyboardInterrupt:
|
||||
traceback.format_exc()
|
||||
except (VmtpException, sshutils.SSHError, ClientException, Exception):
|
||||
global return_code
|
||||
LOG.error(traceback.format_exc())
|
||||
error_flag = True
|
||||
return_code = 1
|
||||
|
||||
if self.config.stop_on_error and error_flag:
|
||||
LOG.error('Stopping execution on error, cleanup all VMs/networks manually')
|
||||
sys.exit(2)
|
||||
else:
|
||||
global return_code
|
||||
return_code = 1
|
||||
self.teardown()
|
||||
|
||||
def test_native_tp(nhosts, ifname, config):
|
||||
|
Loading…
Reference in New Issue
Block a user