As part of a precursor to other refactoring, make returns less list-like throughout runner.

This commit is contained in:
Michael DeHaan 2012-05-25 18:44:29 -04:00
commit 6d580aea02
2 changed files with 150 additions and 125 deletions

View file

@ -128,6 +128,8 @@ class CliRunnerCallbacks(DefaultRunnerCallbacks):
self._on_any(host,res)
def on_unreachable(self, host, res):
if type(res) == dict:
res = res.get('msg','')
print "%s | FAILED => %s" % (host, res)
if self.options.tree:
utils.write_tree_file(self.options.tree, host, utils.bigjson(dict(failed=True, msg=res)))