mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Ensure local exec errs have a meaningful error output
This commit is contained in:
parent
1beb3eed45
commit
1d0dfdecbd
1 changed files with 4 additions and 1 deletions
|
@ -88,7 +88,10 @@ class SSHCommandExecutionError(SSHException, CommandExecutionError):
|
|||
return super().to_ret()
|
||||
|
||||
def __str__(self):
|
||||
return f"{self._error}: {self.stderr or self.stdout}"
|
||||
ret = self.to_ret()
|
||||
if not isinstance(ret, str):
|
||||
ret = self.stderr or self.stdout
|
||||
return f"{self._error}: {ret}"
|
||||
|
||||
|
||||
class SSHPermissionDeniedError(SSHException):
|
||||
|
|
Loading…
Add table
Reference in a new issue