Issue 1323

This commit is contained in:
Thomas Nagy 2013-06-01 03:52:12 +02:00
parent 4e8fda5644
commit 1e2e7f6074
1 changed files with 7 additions and 7 deletions

View File

@ -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)