Commit 511c7c85 by Atte Virtanen

Check for existence of isatty on stdout before calling it

parent c3a8b6ff
...@@ -21,7 +21,7 @@ import sys ...@@ -21,7 +21,7 @@ import sys
ANSIBLE_COLOR=True ANSIBLE_COLOR=True
if os.getenv("ANSIBLE_NOCOLOR") is not None: if os.getenv("ANSIBLE_NOCOLOR") is not None:
ANSIBLE_COLOR=False ANSIBLE_COLOR=False
elif not sys.stdout.isatty(): elif not hasattr(sys.stdout, 'isatty') or not sys.stdout.isatty():
ANSIBLE_COLOR=False ANSIBLE_COLOR=False
else: else:
try: try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment