Stop asyncio.async throwing a syntax error in 3.7.

Maintains support for < 3.4.4
This commit is contained in:
MysterialPy 2017-11-13 22:07:54 +10:00 committed by bmintz
parent fc9eb93486
commit 1863a1c663

View File

@ -29,7 +29,7 @@ import asyncio
try:
create_task = asyncio.ensure_future
except AttributeError:
create_task = asyncio.async
create_task = getattr(asyncio, 'async')
try:
run_coroutine_threadsafe = asyncio.run_coroutine_threadsafe