Merge pull request #3588 from Atte/devel
Check for existence of isatty on stdout before calling it
This commit is contained in:
commit
7965bc729b
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue