Stop using not existing ShellCommandError exception class
In commit [1] was introduced exception class ShellCommandFailed
and it should be used in common.shell module. But by mistake
there was used not existing ShellCommandError class there.
This patch fixes that.
[1] https://review.opendev.org/#/c/612978/
Change-Id: I0b51165ea4d541b0cd2f5820a64cd7a82f23c6c9
diff --git a/neutron_tempest_plugin/common/shell.py b/neutron_tempest_plugin/common/shell.py
index bd4a7a3..eebb07d 100644
--- a/neutron_tempest_plugin/common/shell.py
+++ b/neutron_tempest_plugin/common/shell.py
@@ -46,7 +46,7 @@
:param timeout: command execution timeout in seconds
- :param check: when False it doesn't raises ShellCommandError when
+ :param check: when False it doesn't raises ShellCommandFailed when
exit status is not zero. True by default
:returns: STDOUT text when command execution terminates with zero exit
@@ -57,7 +57,7 @@
try to read STDOUT and STDERR buffers (not fully implemented) before
raising the exception.
- :raises ShellCommandError: when command execution terminates with non-zero
+ :raises ShellCommandFailed: when command execution terminates with non-zero
exit status.
"""
ssh_client = ssh_client or SSH_PROXY_CLIENT
@@ -110,7 +110,7 @@
except lib_exc.SSHExecCommandFailed as ex:
# Please note class SSHExecCommandFailed has been re-based on
- # top of ShellCommandError
+ # top of ShellCommandFailed
stdout = ex.stdout
stderr = ex.stderr
exit_status = ex.exit_status
@@ -174,7 +174,7 @@
stdout=self.stdout)
elif self.exit_status != 0:
- raise exceptions.ShellCommandError(command=self.command,
- exit_status=self.exit_status,
- stderr=self.stderr,
- stdout=self.stdout)
+ raise exceptions.ShellCommandFailed(command=self.command,
+ exit_status=self.exit_status,
+ stderr=self.stderr,
+ stdout=self.stdout)