summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/coroutines.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2016-09-09 21:26:31 (GMT)
committerGuido van Rossum <guido@python.org>2016-09-09 21:26:31 (GMT)
commit7b3b3dc85da3ec176d7fd7caa546298c232c9c0a (patch)
tree045958462b64c3f8c393c3cc05131c03ceb43aef /Lib/asyncio/coroutines.py
parent9b32bda851c113cf4a85cdc01c603a1daba4d5d4 (diff)
downloadcpython-7b3b3dc85da3ec176d7fd7caa546298c232c9c0a.zip
cpython-7b3b3dc85da3ec176d7fd7caa546298c232c9c0a.tar.gz
cpython-7b3b3dc85da3ec176d7fd7caa546298c232c9c0a.tar.bz2
Merge asyncio upstream.
Diffstat (limited to 'Lib/asyncio/coroutines.py')
-rw-r--r--Lib/asyncio/coroutines.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/asyncio/coroutines.py b/Lib/asyncio/coroutines.py
index 71bc6fb..72ffb44 100644
--- a/Lib/asyncio/coroutines.py
+++ b/Lib/asyncio/coroutines.py
@@ -204,8 +204,8 @@ def coroutine(func):
@functools.wraps(func)
def coro(*args, **kw):
res = func(*args, **kw)
- if isinstance(res, futures.Future) or inspect.isgenerator(res) or \
- isinstance(res, CoroWrapper):
+ if (futures.isfuture(res) or inspect.isgenerator(res) or
+ isinstance(res, CoroWrapper)):
res = yield from res
elif _AwaitableABC is not None:
# If 'func' returns an Awaitable (new in 3.5) we