mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-07 20:30:41 -05:00
Disable colored messages in Windows (related #794)
This commit is contained in:
parent
f4b659f782
commit
9edb0916f4
1 changed files with 2 additions and 2 deletions
|
@ -254,7 +254,7 @@ def report_warning(self, message):
|
||||||
Print the message to stderr, it will be prefixed with 'WARNING:'
|
Print the message to stderr, it will be prefixed with 'WARNING:'
|
||||||
If stderr is a tty file the 'WARNING:' will be colored
|
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'
|
_msg_header=u'\033[0;33mWARNING:\033[0m'
|
||||||
else:
|
else:
|
||||||
_msg_header=u'WARNING:'
|
_msg_header=u'WARNING:'
|
||||||
|
@ -266,7 +266,7 @@ def report_error(self, message, tb=None):
|
||||||
Do the same as trouble, but prefixes the message with 'ERROR:', colored
|
Do the same as trouble, but prefixes the message with 'ERROR:', colored
|
||||||
in red if stderr is a tty file.
|
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'
|
_msg_header = u'\033[0;31mERROR:\033[0m'
|
||||||
else:
|
else:
|
||||||
_msg_header = u'ERROR:'
|
_msg_header = u'ERROR:'
|
||||||
|
|
Loading…
Reference in a new issue