fix get_running_loop on python 3.6

This commit is contained in:
Jack Robison 2018-10-17 22:45:13 -04:00
parent 5d129fdf98
commit a1ea5f2af6
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -4,3 +4,9 @@ __author__ = "Jack Robison"
__maintainer__ = "Jack Robison" __maintainer__ = "Jack Robison"
__license__ = "MIT" __license__ = "MIT"
__email__ = "jackrobison@lbry.io" __email__ = "jackrobison@lbry.io"
import sys
import asyncio
if not hasattr(asyncio, "get_running_loop") and hasattr(asyncio, "_get_running_loop"): # python 3.6
setattr(sys.modules['asyncio'], "get_running_loop", asyncio._get_running_loop)