commit | 7ca6c55a4e2655dc0e5d780c3cc2ed7234edd72f | [log] [tgz] |
---|---|---|
author | Yury Selivanov <yselivanov@sprymix.com> | Mon Aug 17 14:46:51 2015 -0400 |
committer | Yury Selivanov <yselivanov@sprymix.com> | Mon Aug 17 14:46:51 2015 -0400 |
tree | af6e7b6ff99ddd68a19f3eb32d40754038063e71 | |
parent | 6707906ea5e0df1132d3cd0c77707ccc19948341 [diff] [blame] |
Issue #24867: Fix asyncio.Task.get_stack() for 'async def' coroutines
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 @@ 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: