diff options
author | Jai Grimshaw <jai@jaigrimshaw.com> | 2013-08-31 01:53:01 +1000 |
---|---|---|
committer | Jai Grimshaw <jai@jaigrimshaw.com> | 2013-08-31 01:53:01 +1000 |
commit | b3f0e5304807862ce72c136da90b860df805ee5c (patch) | |
tree | 3fd40fd3e96bd3bbfeb8d381d259b7ad2267478e /youtube_dl | |
parent | 3243d0f7b669128c91c64816a9ca3502ae4e4094 (diff) |
Fixed issue #1277 KeyError when no description.
Allows a continue with a warning when an extractor cannot retrieve a description.
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/YoutubeDL.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index b289bd9e2..afce28040 100644 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -492,6 +492,8 @@ class YoutubeDL(object): self.report_writedescription(descfn) with io.open(encodeFilename(descfn), 'w', encoding='utf-8') as descfile: descfile.write(info_dict['description']) + except (KeyError, TypeError): + self.report_warning(u'Cannot extract description.') except (OSError, IOError): self.report_error(u'Cannot write description file ' + descfn) return |