mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
(Merge 3.4) asyncio: Task.__repr__() now also handles CoroWrapper
This commit is contained in:
commit
6f3551e15f
1 changed files with 1 additions and 1 deletions
|
|
@ -190,7 +190,7 @@ class Task(futures.Future):
|
|||
i = len(res)
|
||||
text = self._coro.__name__
|
||||
coro = self._coro
|
||||
if inspect.isgenerator(coro):
|
||||
if iscoroutine(coro):
|
||||
filename = coro.gi_code.co_filename
|
||||
if coro.gi_frame is not None:
|
||||
text += ' at %s:%s' % (filename, coro.gi_frame.f_lineno)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue