diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-11-24 06:08:11 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-11-24 06:08:11 +0100 |
commit | 8bf9319e9c0c02f5516b00509476abff89eb3d41 (patch) | |
tree | 552b903294b6f7b71735341c7f61b00186a0c4fb /youtube_dl/YoutubeDL.py | |
parent | 4914120727f300356ea908fc56f01d1c27d3edf9 (diff) |
Simplify logger code(#1811)
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rw-r--r-- | youtube_dl/YoutubeDL.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index 6729d53ad..d7e2417ac 100644 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -97,7 +97,7 @@ class YoutubeDL(object): playlistend: Playlist item to end at. matchtitle: Download only matching titles. rejecttitle: Reject downloads for matching titles. - logger: Log messages to a logging.Logger instance. + logger: Log messages to a logging.Logger instance. logtostderr: Log messages to stderr instead of stdout. writedescription: Write the video description to a .description file writeinfojson: Write the video description to a .info.json file @@ -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' |