From: Tony Duckles Date: Sat, 7 Apr 2012 02:49:14 +0000 (-0500) Subject: Skip ANSI escape color codes for NT X-Git-Tag: v1.5.0~2 X-Git-Url: http://git.nynim.org/svn2svn.git/commitdiff_plain/f1919fc6d41cd1997f556148e3098ec7787311e7 Skip ANSI escape color codes for NT * svn2svn/ui.py (status): Don't try to write ANSI escape sequences for color-mode for NT since cmd.exe doesn't support them. --- diff --git a/svn2svn/ui.py b/svn2svn/ui.py index 6afc01f..2ea42d7 100644 --- a/svn2svn/ui.py +++ b/svn2svn/ui.py @@ -81,7 +81,7 @@ def status(msg, *args, **kwargs): msg = msg.encode('utf-8') color = kwargs.get('color', None) bold = kwargs.get('bold', None) - if color in _colors: + if color in _colors and os.name != 'nt': msg = '%s%s%s' % ("\x1b["+_colors[color]+(";1" if bold else "")+"m", msg, "\x1b[0m") stream.write(msg) stream.flush()