diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2015-08-17 14:46:51 -0400 |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2015-08-17 14:46:51 -0400 |
commit | 7ca6c55a4e2655dc0e5d780c3cc2ed7234edd72f (patch) | |
tree | af6e7b6ff99ddd68a19f3eb32d40754038063e71 /Lib/asyncio/tasks.py | |
parent | 6707906ea5e0df1132d3cd0c77707ccc19948341 (diff) | |
download | cpython-git-7ca6c55a4e2655dc0e5d780c3cc2ed7234edd72f.tar.gz |
Issue #24867: Fix asyncio.Task.get_stack() for 'async def' coroutines
Diffstat (limited to 'Lib/asyncio/tasks.py')
-rw-r--r-- | Lib/asyncio/tasks.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py index 9bfc1cf814..a235e742e2 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: |