Fix AttributeError when test_function_help fails
This commit fixes a missed usage of the CommandFailed exception during the migration moving it from tempest.cli to tempest.exceptions in change Ibf5f1cbbb847d32976b54c4484acfc3c0e3b4f48. The outdated module path could cause an AttributeError to be raised because the exception no longer existing in tempest.cli. Change-Id: I502eaef3486d903931dab43069cec1ae7ee570f1
This commit is contained in:
committed by
Matthew Treinish
parent
acba551078
commit
884e2f3916
@@ -16,7 +16,7 @@
|
||||
import shlex
|
||||
import subprocess
|
||||
|
||||
import tempest.cli as cli
|
||||
import tempest.exceptions as exceptions
|
||||
from tempest.openstack.common import log as logging
|
||||
from tempest.tests import base
|
||||
|
||||
@@ -43,9 +43,9 @@ class StressFrameworkTest(base.TestCase):
|
||||
result, result_err = proc.communicate()
|
||||
if proc.returncode != 0:
|
||||
LOG.debug('error of %s:\n%s' % (cmd_str, result_err))
|
||||
raise cli.CommandFailed(proc.returncode,
|
||||
cmd,
|
||||
result)
|
||||
raise exceptions.CommandFailed(proc.returncode,
|
||||
cmd,
|
||||
result)
|
||||
finally:
|
||||
LOG.debug('output of %s:\n%s' % (cmd_str, result))
|
||||
return proc.returncode
|
||||
|
||||
Reference in New Issue
Block a user