mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 16:23:10 +00:00
also captures typeerrors for when not getting a proper string in output
This commit is contained in:
@@ -295,7 +295,7 @@ class TaskExecutor:
|
||||
# response, so we parse it here and replace the result
|
||||
try:
|
||||
result = json.loads(result.get('stdout'))
|
||||
except ValueError, e:
|
||||
except (TypeError, ValueError) as e:
|
||||
return dict(failed=True, msg="The async task did not return valid JSON: %s" % str(e))
|
||||
|
||||
if self._task.poll > 0:
|
||||
|
||||
Reference in New Issue
Block a user