1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Clean non-printable chars from stdout instead of dropping the whole thing

This commit is contained in:
Nick Irvine 2014-05-21 19:24:28 -07:00
parent 10414145b2
commit 6b70ee23ab

View file

@ -877,7 +877,7 @@ class Runner(object):
if hasattr(sys.stdout, "isatty"):
if "stdout" in data and sys.stdout.isatty():
if not string_functions.isprintable(data['stdout']):
data['stdout'] = ''
data['stdout'] = ''.join(c for c in data['stdout'] if string_functions.isprintable(c))
if 'item' in inject:
result.result['item'] = inject['item']