diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2016-03-02 15:49:36 (GMT) |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2016-03-02 15:49:36 (GMT) |
commit | 578bc5b80b248f002373dd4d7cf29920fe18f34b (patch) | |
tree | 3898552d6d5cf63c6e567c68f6b8124e859d1df5 /Lib/asyncio/coroutines.py | |
parent | 3ebaea005dc6ab4a06fb585c23321b9bb0398b90 (diff) | |
parent | dce63234c55db7395ccc62d5e6e96c19696871e8 (diff) | |
download | cpython-578bc5b80b248f002373dd4d7cf29920fe18f34b.zip cpython-578bc5b80b248f002373dd4d7cf29920fe18f34b.tar.gz cpython-578bc5b80b248f002373dd4d7cf29920fe18f34b.tar.bz2 |
Merge 3.5 (issue #25647)
Diffstat (limited to 'Lib/asyncio/coroutines.py')
-rw-r--r-- | Lib/asyncio/coroutines.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/asyncio/coroutines.py b/Lib/asyncio/coroutines.py index 27ab42a..71bc6fb 100644 --- a/Lib/asyncio/coroutines.py +++ b/Lib/asyncio/coroutines.py @@ -204,7 +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): + if isinstance(res, futures.Future) 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 |