Browse Source

Fix subtitle download error reporting (Fixes #2724)

robbie 11 năm trước cách đây
mục cha
commit
e4db19511a
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      youtube_dl/YoutubeDL.py

+ 1 - 1
youtube_dl/YoutubeDL.py

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