mirror of https://gitlab.com/ita1024/waf.git
Issue 1323
This commit is contained in:
parent
4e8fda5644
commit
1e2e7f6074
|
@ -8,6 +8,13 @@ logging, colors, terminal width and pretty-print
|
|||
|
||||
import os, re, traceback, sys
|
||||
|
||||
_nocolor = os.environ.get('NOCOLOR', 'no') not in ('no', '0', 'false')
|
||||
try:
|
||||
if not _nocolor:
|
||||
import waflib.ansiterm
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
try:
|
||||
import threading
|
||||
except ImportError:
|
||||
|
@ -40,13 +47,6 @@ else:
|
|||
def isatty(self):
|
||||
return self.stream.isatty()
|
||||
|
||||
_nocolor = os.environ.get('NOCOLOR', 'no') not in ('no', '0', 'false')
|
||||
try:
|
||||
if not _nocolor:
|
||||
import waflib.ansiterm
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
if not os.environ.get('NOSYNC', False):
|
||||
if id(sys.stdout) == id(sys.__stdout__):
|
||||
sys.stdout = sync_stream(sys.stdout)
|
||||
|
|
Loading…
Reference in New Issue