From 98ac902c4979e4529b166e873473bef42baa2e3e Mon Sep 17 00:00:00 2001 From: pukkandan Date: Mon, 13 Mar 2023 05:19:13 +0530 Subject: [PATCH] [dependencies/Cryptodome] Fix `__bool__` Bug in 65f6e807804d2af5e00f2aecd72bfc43af19324a --- yt_dlp/dependencies/Cryptodome.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/yt_dlp/dependencies/Cryptodome.py b/yt_dlp/dependencies/Cryptodome.py index 74ab6575c..2cfa4c952 100644 --- a/yt_dlp/dependencies/Cryptodome.py +++ b/yt_dlp/dependencies/Cryptodome.py @@ -1,4 +1,4 @@ -import types +from ..compat.compat_utils import passthrough_module try: import Cryptodome as _parent @@ -6,9 +6,11 @@ except ImportError: try: import Crypto as _parent except (ImportError, SyntaxError): # Old Crypto gives SyntaxError in newer Python - _parent = types.ModuleType('no_Cryptodome') + _parent = passthrough_module(__name__, 'no_Cryptodome') __bool__ = lambda: False +del passthrough_module + __version__ = '' AES = PKCS1_v1_5 = Blowfish = PKCS1_OAEP = SHA1 = CMAC = RSA = None try: