classification
Title: sphinx: ansi color even on dumb terminal
Type: Stage:
Components: Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: dottedmag, georg.brandl
Priority: normal Keywords:

Created on 2008-10-10 21:21 by dottedmag, last changed 2008-10-16 21:16 by georg.brandl. This issue is now closed.

Messages (2)
msg74644 - (view) Author: Mikhail Gusarov (dottedmag) Date: 2008-10-10 21:20
Debian bug #501629 (http://bugs.debian.org/cgi-bin/bugreport.cgi?
bug=501629).

Both sphinx-build and sphinx-quicksetup attempt (and fail) to use ansi
color sequences, even when TERM=dumb (for example, when run from an
emacs shell buffer, or m-x compile.  This produces garbage, like this:

^[[01mSphinx v0.4.2, building linkcheck^[[39;49;00m

While it does look like I can add -N in the generated Makefile, and
thus this is only a wishlist item since I have a workaround - it
really shouldn't generate color unless it has *some* indication that
it might work - even mooching off of $LSCOLORS would be better than
doing it blindly, though it should be enough to look at a TERM or
TERMCAP property - or perhaps indirectly via curses.has_colors() which
does appear to be able to tell "xterm" from "dumb" successfully.
msg74860 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-10-16 21:16
Should be fixed in r66933.
History
Date User Action Args
2008-10-16 21:16:37georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg74860
2008-10-10 21:44:51benjamin.petersonsetassignee: georg.brandl
nosy: + georg.brandl
2008-10-10 21:21:01dottedmagcreate