diff options
| author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-06-24 15:40:13 +0530 |
|---|---|---|
| committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-06-25 00:08:52 +0530 |
| commit | 3c5386cd711a5a0480a0b8d72e9df5007b10ac92 (patch) | |
| tree | acc00b854ed5766d8d81defc7a4e4d56e82c67b7 /yt_dlp/compat/_legacy.py | |
| parent | bc401608830ba34831c31b74eb5661114bf284e7 (diff) | |
[compat] Fix `compat.WINDOWS_VT_MODE`
Diffstat (limited to 'yt_dlp/compat/_legacy.py')
| -rw-r--r-- | yt_dlp/compat/_legacy.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/yt_dlp/compat/_legacy.py b/yt_dlp/compat/_legacy.py index c4d95e1fb..79461617d 100644 --- a/yt_dlp/compat/_legacy.py +++ b/yt_dlp/compat/_legacy.py @@ -14,6 +14,7 @@ import urllib import xml.etree.ElementTree as etree from subprocess import DEVNULL +from .compat_utils import passthrough_module from .asyncio import run as compat_asyncio_run # noqa: F401 from .re import Pattern as compat_Pattern # noqa: F401 from .re import match as compat_Match # noqa: F401 @@ -22,6 +23,9 @@ from ..dependencies import brotli as compat_brotli # noqa: F401 from ..dependencies import websockets as compat_websockets # noqa: F401 +passthrough_module(__name__, '...utils', ('WINDOWS_VT_MODE', 'windows_enable_vt_mode')) + + # compat_ctypes_WINFUNCTYPE = ctypes.WINFUNCTYPE # will not work since ctypes.WINFUNCTYPE does not exist in UNIX machines def compat_ctypes_WINFUNCTYPE(*args, **kwargs): @@ -55,10 +59,3 @@ compat_xml_parse_error = etree.ParseError compat_xpath = lambda xpath: xpath compat_zip = zip workaround_optparse_bug9161 = lambda: None - - -def __getattr__(name): - if name in ('WINDOWS_VT_MODE', 'windows_enable_vt_mode'): - from .. import utils - return getattr(utils, name) - raise AttributeError(name) |
