diff options
| author | Georg Brandl <georg@python.org> | 2009-05-10 21:06:34 +0200 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2009-05-10 21:06:34 +0200 |
| commit | 7b982e6c65e51c706da0708fd1557352649b4be6 (patch) | |
| tree | ebe9b4810b5b3d1957c5090effbd06b92ed0057e /sphinx/setup_command.py | |
| parent | 3f860a5891ce5126cdd9885d3abba66b615db576 (diff) | |
| download | sphinx-7b982e6c65e51c706da0708fd1557352649b4be6.tar.gz | |
#159: do not fail if sys.stdout has no isatty() method.
Diffstat (limited to 'sphinx/setup_command.py')
| -rw-r--r-- | sphinx/setup_command.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/setup_command.py b/sphinx/setup_command.py index ac395f39..a33b4ee6 100644 --- a/sphinx/setup_command.py +++ b/sphinx/setup_command.py @@ -18,7 +18,7 @@ from StringIO import StringIO from distutils.cmd import Command from sphinx.application import Sphinx -from sphinx.util.console import darkred, nocolor +from sphinx.util.console import darkred, nocolor, color_terminal class BuildDoc(Command): @@ -63,7 +63,7 @@ class BuildDoc(Command): self.mkpath(self.builder_target_dir) def run(self): - if not sys.stdout.isatty() or sys.platform == 'win32': + if not color_terminal(): # Windows' poor cmd box doesn't understand ANSI sequences nocolor() if not self.verbose: |
