Add std out to ssh exception.
Some commands in case of error redirect his output in stdout instead of stderr. I suggest to combine stdout and stderr and pass this string to ssh exception. It will help to understand better errors in ssh tests. Change-Id: Ied28043f0eaefa1c3a00b7e98e52b13a86873827
This commit is contained in:
parent
672760e1b7
commit
ae0294be44
@ -143,7 +143,7 @@ class Client(object):
|
||||
if 0 != exit_status:
|
||||
raise exceptions.SSHExecCommandFailed(
|
||||
command=cmd, exit_status=exit_status,
|
||||
strerror=''.join(err_data))
|
||||
stderr=err_data, stdout=out_data)
|
||||
return ''.join(out_data)
|
||||
|
||||
def test_connection_auth(self):
|
||||
|
@ -184,4 +184,5 @@ class SSHTimeout(TempestException):
|
||||
class SSHExecCommandFailed(TempestException):
|
||||
"""Raised when remotely executed command returns nonzero status."""
|
||||
message = ("Command '%(command)s', exit status: %(exit_status)d, "
|
||||
"Error:\n%(strerror)s")
|
||||
"stderr:\n%(stderr)s\n"
|
||||
"stdout:\n%(stdout)s")
|
||||
|
Loading…
x
Reference in New Issue
Block a user