A feature-rich command-line audio/video downloader
Don't try to write the subtitles if it's None
Jaime Marquínez Ferrándiz6804038d065e
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.pyindex be6ceafcc3..e69d844b8a 100644--- a/youtube_dl/YoutubeDL.py+++ b/youtube_dl/YoutubeDL.py@@ -494,6 +494,8 @@ class YoutubeDL(object):sub_format = self.params.get('subtitlesformat')for sub_lang in subtitles.keys():sub = subtitles[sub_lang]+ if sub is None:+ continuetry:sub_filename = filename.rsplit('.', 1)[0] + u'.' + sub_lang + u'.' + sub_formatself.report_writesubtitles(sub_filename)