mirror of https://github.com/yt-dlp/yt-dlp
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
492 B
Python
24 lines
492 B
Python
3 years ago
|
# flake8: noqa: F405
|
||
|
from asyncio import * # noqa: F403
|
||
|
|
||
3 years ago
|
from .compat_utils import passthrough_module
|
||
3 years ago
|
|
||
|
passthrough_module(__name__, 'asyncio')
|
||
|
del passthrough_module
|
||
3 years ago
|
|
||
|
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)
|
||
3 years ago
|
|
||
|
try:
|
||
|
all_tasks # >= 3.7
|
||
|
except NameError:
|
||
|
all_tasks = Task.all_tasks
|