Skip to content

Commit

Permalink
Ensure local exec errs have a meaningful error output
Browse files Browse the repository at this point in the history
  • Loading branch information
lkubb authored and dwoz committed Dec 30, 2023
1 parent 1beb3ee commit 1d0dfde
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion salt/client/ssh/wrapper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ def to_ret(self):
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):
Expand Down

0 comments on commit 1d0dfde

Please sign in to comment.