Ensure sys.stdout has an istty method

pull/5586/head
James Tanner 11 years ago
parent d7c8cf6ca7
commit 09e0d052ca

@ -745,6 +745,7 @@ class Runner(object):
data = result.result
# https://github.com/ansible/ansible/issues/4958
if hasattr(sys.stdout, "isatty"):
if "stdout" in data and sys.stdout.isatty():
if not string_functions.isprintable(data['stdout']):
data['stdout'] = ''

Loading…
Cancel
Save