mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-06 08:15:16 +00:00
[compat] Split into sub-modules (#2173)
Authored by: fstirlitz, pukkandan
This commit is contained in:
16
yt_dlp/compat/asyncio/__init__.py
Normal file
16
yt_dlp/compat/asyncio/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# flake8: noqa: F405
|
||||
|
||||
from asyncio import * # noqa: F403
|
||||
|
||||
from . import tasks # noqa: F401
|
||||
|
||||
try:
|
||||
run # >= 3.7
|
||||
except NameError:
|
||||
def run(coro):
|
||||
try:
|
||||
loop = get_event_loop()
|
||||
except RuntimeError:
|
||||
loop = new_event_loop()
|
||||
set_event_loop(loop)
|
||||
loop.run_until_complete(coro)
|
||||
Reference in New Issue
Block a user