Tracebacks are now catchable with ignore_errors and have streamlined output. Also removes 'baby-JSON' for bash modules.

This commit is contained in:
Michael DeHaan 2014-09-11 12:26:54 -04:00
commit 26cdddaebf
9 changed files with 32 additions and 47 deletions

View file

@ -539,7 +539,7 @@ class Runner(object):
cmd2 = conn.shell.remove(tmp, recurse=True)
self._low_level_exec_command(conn, cmd2, tmp, sudoable=False)
data = utils.parse_json(res['stdout'], from_remote=True)
data = utils.parse_json(res['stdout'], from_remote=True, no_exceptions=True)
if 'parsed' in data and data['parsed'] == False:
data['msg'] += res['stderr']
return ReturnData(conn=conn, result=data)

View file

@ -43,7 +43,7 @@ class ReturnData(object):
self.diff = diff
if type(self.result) in [ str, unicode ]:
self.result = utils.parse_json(self.result, from_remote=True)
self.result = utils.parse_json(self.result, from_remote=True, exceptions=False)
if self.host is None:
raise Exception("host not set")