summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/python/retrace
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-03-25 10:22:05 +0000
committerJosé Fonseca <jfonseca@vmware.com>2009-03-25 21:03:36 +0000
commit5743483778ffe5b389d10b1651ae1e8951b397ee (patch)
treef3ff414b0843f3b31f71b8cf486ce8eb34465d9e /src/gallium/state_trackers/python/retrace
parentb52b78a2269e6f773fc02c9740e7f2e18cdf1699 (diff)
python: Use Ansi escape codes regardless of output is a tty or not.
Diffstat (limited to 'src/gallium/state_trackers/python/retrace')
-rwxr-xr-xsrc/gallium/state_trackers/python/retrace/format.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/python/retrace/format.py b/src/gallium/state_trackers/python/retrace/format.py
index 0bf6baf0b9..d56d72f606 100755
--- a/src/gallium/state_trackers/python/retrace/format.py
+++ b/src/gallium/state_trackers/python/retrace/format.py
@@ -27,6 +27,9 @@
##########################################################################
+import sys
+
+
class Formatter:
'''Plain formatter'''
@@ -93,7 +96,7 @@ class AnsiFormatter(Formatter):
def DefaultFormatter(stream):
- if stream.isatty():
+ if sys.platform in ('linux2', 'cygwin'):
return AnsiFormatter(stream)
else:
return Formatter(stream)