diff --git a/molecule/output.py b/molecule/output.py index c78f67b..47b26d7 100644 --- a/molecule/output.py +++ b/molecule/output.py @@ -172,9 +172,6 @@ def is_stdout_a_tty(): fn = sys.stdout.fileno() return os.isatty(fn) -if not is_stdout_a_tty(): - nocolor() - def xterm_title(mystr, raw = False): """ Set new xterm title. @@ -236,6 +233,8 @@ def nocolor(): os.environ['ETP_NO_COLOR'] = "1" global havecolor havecolor=0 +if not is_stdout_a_tty(): + nocolor() def getcolor(): """