aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/compat
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2023-02-28 23:10:54 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2023-02-28 23:15:13 +0530
commit65f6e807804d2af5e00f2aecd72bfc43af19324a (patch)
treeaf8867ce5b7a2fa57193d33192b663d71e98822e /yt_dlp/compat
parentb059188383eee4fa336ef728dda3ff4bb7335625 (diff)
downloadhypervideo-pre-65f6e807804d2af5e00f2aecd72bfc43af19324a.tar.lz
hypervideo-pre-65f6e807804d2af5e00f2aecd72bfc43af19324a.tar.xz
hypervideo-pre-65f6e807804d2af5e00f2aecd72bfc43af19324a.zip
[dependencies] Simplify `Cryptodome`
Closes #6292, closes #6272, closes #6338
Diffstat (limited to 'yt_dlp/compat')
-rw-r--r--yt_dlp/compat/_legacy.py2
-rw-r--r--yt_dlp/compat/compat_utils.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/yt_dlp/compat/_legacy.py b/yt_dlp/compat/_legacy.py
index 84d749209..83bf869a8 100644
--- a/yt_dlp/compat/_legacy.py
+++ b/yt_dlp/compat/_legacy.py
@@ -32,9 +32,9 @@ from re import match as compat_Match # noqa: F401
from . import compat_expanduser, compat_HTMLParseError, compat_realpath
from .compat_utils import passthrough_module
-from ..dependencies import Cryptodome_AES as compat_pycrypto_AES # noqa: F401
from ..dependencies import brotli as compat_brotli # noqa: F401
from ..dependencies import websockets as compat_websockets # noqa: F401
+from ..dependencies.Cryptodome import AES as compat_pycrypto_AES # noqa: F401
passthrough_module(__name__, '...utils', ('WINDOWS_VT_MODE', 'windows_enable_vt_mode'))
diff --git a/yt_dlp/compat/compat_utils.py b/yt_dlp/compat/compat_utils.py
index 8956b3bf1..3ca46d270 100644
--- a/yt_dlp/compat/compat_utils.py
+++ b/yt_dlp/compat/compat_utils.py
@@ -48,7 +48,7 @@ def passthrough_module(parent, child, allowed_attributes=(..., ), *, callback=la
"""Passthrough parent module into a child module, creating the parent if necessary"""
def __getattr__(attr):
if _is_package(parent):
- with contextlib.suppress(ImportError):
+ with contextlib.suppress(ModuleNotFoundError):
return importlib.import_module(f'.{attr}', parent.__name__)
ret = from_child(attr)