Fixed #8100: Jython, apparently, is now a TTY.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8239 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss 2008-08-08 18:51:34 +00:00
parent 176fabcc6f
commit 5fb9599086
1 changed files with 1 additions and 2 deletions

View File

@ -11,8 +11,7 @@ def supports_color():
Returns True if the running system's terminal supports color, and False Returns True if the running system's terminal supports color, and False
otherwise. otherwise.
""" """
unsupported_platform = (sys.platform in ('win32', 'Pocket PC') unsupported_platform = (sys.platform in ('win32', 'Pocket PC'))
or sys.platform.startswith('java'))
# isatty is not always implemented, #6223. # isatty is not always implemented, #6223.
is_a_tty = hasattr(sys.stdout, 'isatty') and sys.stdout.isatty() is_a_tty = hasattr(sys.stdout, 'isatty') and sys.stdout.isatty()
if unsupported_platform or not is_a_tty: if unsupported_platform or not is_a_tty: