X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=youtube-dl;a=blobdiff_plain;f=youtube_dl%2FYoutubeDL.py;fp=youtube_dl%2FYoutubeDL.py;h=c2f992b8e00f333f59da38ffd59153183d057281;hp=b289bd9e26bbc9993e6f1295a31d20b3275f5f48;hb=535f59bbcf63c98145b8dcbef630a5c9b344db48;hpb=dd01d6558a142deb93fe7d6122ae698ecdea4f63 diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index b289bd9e2..c2f992b8e 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'There\'s no description to write.') except (OSError, IOError): self.report_error(u'Cannot write description file ' + descfn) return