mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 14:26:32 -05:00
Simplify logger code(#1811)
This commit is contained in:
parent
4914120727
commit
8bf9319e9c
@ -193,7 +193,7 @@ class YoutubeDL(object):
|
||||
|
||||
def to_screen(self, message, skip_eol=False):
|
||||
"""Print message to stdout if not in quiet mode."""
|
||||
if self.params.get('logger', False):
|
||||
if self.params.get('logger'):
|
||||
self.params['logger'].debug(message)
|
||||
elif not self.params.get('quiet', False):
|
||||
terminator = [u'\n', u''][skip_eol]
|
||||
@ -203,7 +203,7 @@ class YoutubeDL(object):
|
||||
def to_stderr(self, message):
|
||||
"""Print message to stderr."""
|
||||
assert type(message) == type(u'')
|
||||
if self.params.get('logger', False):
|
||||
if self.params.get('logger'):
|
||||
self.params['logger'].error(message)
|
||||
else:
|
||||
output = message + u'\n'
|
||||
|
Loading…
Reference in New Issue
Block a user