mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 07:01:22 -07:00
Ensure sys.stdout has an istty method
This commit is contained in:
parent
d7c8cf6ca7
commit
09e0d052ca
1 changed files with 4 additions and 3 deletions
|
@ -745,6 +745,7 @@ class Runner(object):
|
||||||
data = result.result
|
data = result.result
|
||||||
|
|
||||||
# https://github.com/ansible/ansible/issues/4958
|
# https://github.com/ansible/ansible/issues/4958
|
||||||
|
if hasattr(sys.stdout, "isatty"):
|
||||||
if "stdout" in data and sys.stdout.isatty():
|
if "stdout" in data and sys.stdout.isatty():
|
||||||
if not string_functions.isprintable(data['stdout']):
|
if not string_functions.isprintable(data['stdout']):
|
||||||
data['stdout'] = ''
|
data['stdout'] = ''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue