summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/tasks.py
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-08-14 19:35:14 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-08-14 19:35:14 (GMT)
commit14f7b8bfb2d9890e27040c352d162f05966a2035 (patch)
tree8144d639344fc1b6a622468b8a8a08065a794e73 /Lib/asyncio/tasks.py
parentd8683762884e82c81b8c5c0db8aa4045c3fbb284 (diff)
parentbb78adeece6cb87c0e20eec36f65cad7c23f27af (diff)
downloadcpython-14f7b8bfb2d9890e27040c352d162f05966a2035.zip
cpython-14f7b8bfb2d9890e27040c352d162f05966a2035.tar.gz
cpython-14f7b8bfb2d9890e27040c352d162f05966a2035.tar.bz2
Merge 3.5 (issue #24867)
Diffstat (limited to 'Lib/asyncio/tasks.py')
-rw-r--r--Lib/asyncio/tasks.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py
index 9bfc1cf..a235e74 100644
--- a/Lib/asyncio/tasks.py
+++ b/Lib/asyncio/tasks.py
@@ -128,7 +128,11 @@ class Task(futures.Future):
returned for a suspended coroutine.
"""
frames = []
- f = self._coro.gi_frame
+ try:
+ # 'async def' coroutines
+ f = self._coro.cr_frame
+ except AttributeError:
+ f = self._coro.gi_frame
if f is not None:
while f is not None:
if limit is not None: