Spaces:
Sleeping
Sleeping
File size: 380 Bytes
e9d67ff |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import asyncio
import sys
def decorator_asyncio_fix(func):
def wrapper(*args):
if (
sys.version_info[0] == 3
and sys.version_info[1] >= 8
and sys.platform.startswith("win")
):
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
return func(*args)
return wrapper
|