mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix SSHCommandExecutionError string casting output
It should include the specific error, not just the general one
This commit is contained in:
parent
d6863fd79a
commit
bade8e8206
1 changed files with 6 additions and 0 deletions
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Add table
Reference in a new issue