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
diff --git a/tempest/tests/stress/test_stress.py b/tempest/tests/stress/test_stress.py
index 3dc2199..5a93472 100644
--- a/tempest/tests/stress/test_stress.py
+++ b/tempest/tests/stress/test_stress.py
@@ -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 @@
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