X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=youtube_dl%2FFileDownloader.py;h=30ab68278a85c7e561a74f00e927b8fe30f8ae80;hb=9edb0916f414d1686e2288c1d544ca7ce2eb280e;hp=100779756d956033ace52742d9be3ef13b821323;hpb=c70446c7dff09cba6b9ece2900692dd12954c2cd;p=youtube-dl.git diff --git a/youtube_dl/FileDownloader.py b/youtube_dl/FileDownloader.py index 100779756..30ab68278 100644 --- a/youtube_dl/FileDownloader.py +++ b/youtube_dl/FileDownloader.py @@ -254,7 +254,7 @@ class FileDownloader(object): Print the message to stderr, it will be prefixed with 'WARNING:' If stderr is a tty file the 'WARNING:' will be colored ''' - if sys.stderr.isatty(): + if sys.stderr.isatty() and os.name != 'nt': _msg_header=u'\033[0;33mWARNING:\033[0m' else: _msg_header=u'WARNING:' @@ -266,7 +266,7 @@ class FileDownloader(object): Do the same as trouble, but prefixes the message with 'ERROR:', colored in red if stderr is a tty file. ''' - if sys.stderr.isatty(): + if sys.stderr.isatty() and os.name != 'nt': _msg_header = u'\033[0;31mERROR:\033[0m' else: _msg_header = u'ERROR:'