]> jfr.im git - yt-dlp.git/blobdiff - test/test_download.py
[compat] Remove deprecated functions from core code
[yt-dlp.git] / test / test_download.py
index b98ddebcbedbb89d667d26f844ded008855604f6..b397b3ecfe13ea7275a884e4891327ffe13b1ce7 100755 (executable)
@@ -26,7 +26,6 @@
 )
 
 import yt_dlp.YoutubeDL  # isort: split
-from yt_dlp.compat import compat_HTTPError
 from yt_dlp.extractor import get_info_extractor
 from yt_dlp.utils import (
     DownloadError,
@@ -168,7 +167,7 @@ def try_rm_tcs_files(tcs=None):
                         force_generic_extractor=params.get('force_generic_extractor', False))
                 except (DownloadError, ExtractorError) as err:
                     # Check if the exception is not a network related one
-                    if not err.exc_info[0] in (urllib.error.URLError, socket.timeout, UnavailableVideoError, http.client.BadStatusLine) or (err.exc_info[0] == compat_HTTPError and err.exc_info[1].code == 503):
+                    if not err.exc_info[0] in (urllib.error.URLError, socket.timeout, UnavailableVideoError, http.client.BadStatusLine) or (err.exc_info[0] == urllib.error.HTTPError and err.exc_info[1].code == 503):
                         raise
 
                     if try_num == RETRIES: