diff options
| author | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2013-07-20 12:59:47 +0200 | 
|---|---|---|
| committer | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2013-07-20 12:59:47 +0200 | 
| commit | 6804038d065e0eeffd9fca2dc55b3262a9191c10 (patch) | |
| tree | 3de7485eb14443934f07cf9d0b2683618950cf74 | |
| parent | 2f799533ae680dc788c8b4f6ce41272cf89689cc (diff) | |
Don't try to write the subtitles if it's None
| -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 be6ceafcc..e69d844b8 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: +                    continue                  try:                      sub_filename = filename.rsplit('.', 1)[0] + u'.' + sub_lang + u'.' + sub_format                      self.report_writesubtitles(sub_filename)  | 
