return concise error when ssh fails

This commit is contained in:
Andreas Lutro 2015-11-06 14:25:00 +01:00
parent cf79722260
commit 5419b98363

View file

@ -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]: