Skip to content

Commit

Permalink
Merge pull request #28638 from alprs/saltssh-handle_ssh_errors
Browse files Browse the repository at this point in the history
Salt-SSH: Return more concise error when SSH command fails
  • Loading branch information
Mike Place committed Nov 6, 2015
2 parents e72e60d + 5419b98 commit 4722e41
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions salt/client/ssh/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,10 @@ def run(self):

self.cache_job(jid, host, ret[host], fun)
ret = self.key_deploy(host, ret)

if ret[host].get('stderr', '').startswith('ssh:'):
ret[host] = ret[host]['stderr']

if not isinstance(ret[host], dict):
p_data = {host: ret[host]}
elif 'return' not in ret[host]:
Expand Down

0 comments on commit 4722e41

Please sign in to comment.