浏览代码

[utils] Save `orig_msg` in `ExtractorError`

dirkf 1 年之前
父节点
当前提交
2eac0fa379
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      youtube_dl/utils.py

+ 1 - 1
youtube_dl/utils.py

@@ -2406,7 +2406,7 @@ class ExtractorError(YoutubeDLError):
         """ tb, if given, is the original traceback (so that it can be printed out).
         """ tb, if given, is the original traceback (so that it can be printed out).
         If expected is set, this is a normal error message and most likely not a bug in youtube-dl.
         If expected is set, this is a normal error message and most likely not a bug in youtube-dl.
         """
         """
-
+        self.orig_msg = msg
         if sys.exc_info()[0] in (compat_urllib_error.URLError, socket.timeout, UnavailableVideoError):
         if sys.exc_info()[0] in (compat_urllib_error.URLError, socket.timeout, UnavailableVideoError):
             expected = True
             expected = True
         if video_id is not None:
         if video_id is not None: