mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
asyncio: Task.__repr__() now also handles CoroWrapper
This commit is contained in:
parent
4b0432d190
commit
bc434e2052
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