mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-07 07:27:15 +08:00
Remove ERROR: prefix on messages if logger is set
This commit is contained in:
parent
38db9a405a
commit
5209797cb1
@ -614,9 +614,12 @@ class YoutubeDL(object):
|
|||||||
|
|
||||||
def report_error(self, message, tb=None):
|
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:' if logger is not set, colored
|
||||||
in red if stderr is a tty file.
|
in red if stderr is a tty file.
|
||||||
'''
|
'''
|
||||||
|
if self.params.get('logger') is not None:
|
||||||
|
error_message = message
|
||||||
|
else:
|
||||||
if not self.params.get('no_color') and self._err_file.isatty() and compat_os_name != 'nt':
|
if not self.params.get('no_color') and self._err_file.isatty() and compat_os_name != 'nt':
|
||||||
_msg_header = '\033[0;31mERROR:\033[0m'
|
_msg_header = '\033[0;31mERROR:\033[0m'
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user