1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-02 01:02:48 +01:00

Merge pull request #1350 from Jaiz909/description-keyerror-fix

Fixed issue #1277 KeyError when no description.
This commit is contained in:
Jaime Marquínez Ferrándiz 2013-09-13 18:20:09 +02:00
commit 535f59bbcf

View File

@ -492,6 +492,8 @@ def process_info(self, info_dict):
self.report_writedescription(descfn) self.report_writedescription(descfn)
with io.open(encodeFilename(descfn), 'w', encoding='utf-8') as descfile: with io.open(encodeFilename(descfn), 'w', encoding='utf-8') as descfile:
descfile.write(info_dict['description']) descfile.write(info_dict['description'])
except (KeyError, TypeError):
self.report_warning(u'There\'s no description to write.')
except (OSError, IOError): except (OSError, IOError):
self.report_error(u'Cannot write description file ' + descfn) self.report_error(u'Cannot write description file ' + descfn)
return return