Fix SSHCommandExecutionError string casting output

It should include the specific error, not just the general one
This commit is contained in:
jeanluc 2023-06-26 13:08:57 +02:00 committed by Daniel Wozniak
parent d6863fd79a
commit bade8e8206

View file

@ -90,6 +90,12 @@ class SSHCommandExecutionError(SSHException, CommandExecutionError):
return self.stderr
return super().to_ret()
def __str__(self):
ret = self.to_ret()
if isinstance(ret, str):
return f"{self._error}: {ret}"
return self._error
class SSHPermissionDeniedError(SSHException):
"""