diff options
author | Larry Hastings <larry@hastings.org> | 2015-08-24 23:53:45 (GMT) |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2015-08-24 23:53:45 (GMT) |
commit | 7250d02b738692fb76a47d75691cca6ba1561040 (patch) | |
tree | 057f93baf56d258d3161fe9686683f94195b1eff /Lib/asyncio/tasks.py | |
parent | 90f5bca3b6e80add7bfaba4d1dce5df1affba951 (diff) | |
parent | 7ca6c55a4e2655dc0e5d780c3cc2ed7234edd72f (diff) | |
download | cpython-7250d02b738692fb76a47d75691cca6ba1561040.zip cpython-7250d02b738692fb76a47d75691cca6ba1561040.tar.gz cpython-7250d02b738692fb76a47d75691cca6ba1561040.tar.bz2 |
Merged in 1st1/cpython350 (pull request #5)
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 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: |