Remove the win32 check, should be covered by color_terminal.

Add color_terminal check to quickstart.
This commit is contained in:
Georg Brandl 2008-10-16 21:18:24 +00:00
parent a1d1f4ee73
commit 5f6352541b
2 changed files with 3 additions and 3 deletions

View File

@ -54,7 +54,7 @@ def main(argv=sys.argv):
from sphinx.application import Sphinx, SphinxError
from docutils.utils import SystemMessage
if not sys.stdout.isatty() or sys.platform == 'win32' or not color_terminal():
if not sys.stdout.isatty() or not color_terminal():
# Windows' poor cmd box doesn't understand ANSI sequences
nocolor()

View File

@ -15,7 +15,7 @@ from os import path
TERM_ENCODING = getattr(sys.stdin, 'encoding', None)
from sphinx.util import make_filename
from sphinx.util.console import purple, bold, red, turquoise, nocolor
from sphinx.util.console import purple, bold, red, turquoise, nocolor, color_terminal
from sphinx.util.texescape import tex_escape_map
@ -380,7 +380,7 @@ def do_prompt(d, key, text, default=None, validator=nonempty):
def inner_main(args):
d = {}
if os.name == 'nt' or not sys.stdout.isatty():
if not sys.stdout.isatty() or not color_terminal():
nocolor()
print bold('Welcome to the Sphinx quickstart utility.')