mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge pull request #28638 from alprs/saltssh-handle_ssh_errors
Salt-SSH: Return more concise error when SSH command fails
This commit is contained in:
commit
4722e41787
@ -544,6 +544,10 @@ class SSH(object):
|
||||
|
||||
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]:
|
||||
|
Loading…
Reference in New Issue
Block a user