Fix subtitle download error reporting (Fixes #2724)

This commit is contained in:
robbie 2014-04-08 15:55:55 +01:00
parent c47d21da80
commit e4db19511a

2
youtube_dl/YoutubeDL.py Normal file → Executable file
View File

@ -936,7 +936,7 @@ def process_info(self, info_dict):
with io.open(encodeFilename(sub_filename), 'w', encoding='utf-8') as subfile:
subfile.write(sub)
except (OSError, IOError):
self.report_error('Cannot write subtitles file ' + descfn)
self.report_error('Cannot write subtitles file ' + sub_filename)
return
if self.params.get('writeinfojson', False):