mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 05:40:23 -07:00
Tracebacks are now catchable with ignore_errors and have streamlined output. Also removes 'baby-JSON' for bash modules.
This commit is contained in:
parent
6c6a0f068e
commit
26cdddaebf
9 changed files with 32 additions and 47 deletions
|
@ -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)
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue