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

Merge pull request #3588 from Atte/devel

Check for existence of isatty on stdout before calling it
This commit is contained in:
Michael DeHaan 2013-07-19 06:04:31 -07:00
commit 7965bc729b

View file

@ -21,7 +21,7 @@ import sys
ANSIBLE_COLOR=True
if os.getenv("ANSIBLE_NOCOLOR") is not None:
ANSIBLE_COLOR=False
elif not sys.stdout.isatty():
elif not hasattr(sys.stdout, 'isatty') or not sys.stdout.isatty():
ANSIBLE_COLOR=False
else:
try: