From 4587b9134491d7a40c0fb467ee8f7cc00c66b91c Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Fri, 25 Jul 2014 18:38:56 -0400 Subject: [PATCH] Move CommandFailed exception to tempest.exceptions When the CommandFailed exception was added it was only being used by the CLI tests. However, it is generally useful for anything that is using subprocess to make external calls. This patch moves it to tempest.exceptions to make using it simpler for non-cli tests to use the exception. Change-Id: Ibf5f1cbbb847d32976b54c4484acfc3c0e3b4f48 --- test_command_failed.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test_command_failed.py b/test_command_failed.py index c539ac6..36a4fc8 100644 --- a/test_command_failed.py +++ b/test_command_failed.py @@ -10,7 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest import cli +from tempest import exceptions from tempest.tests import base @@ -22,8 +22,8 @@ class TestOutputParser(base.TestCase): stdout = "output" stderr = "error" try: - raise cli.CommandFailed(returncode, cmd, stdout, stderr) - except cli.CommandFailed as e: + raise exceptions.CommandFailed(returncode, cmd, stdout, stderr) + except exceptions.CommandFailed as e: self.assertIn(str(returncode), str(e)) self.assertIn(cmd, str(e)) self.assertIn(stdout, str(e))