Commit 56acd8c1 authored by Victor Stinner's avatar Victor Stinner

asyncio: Task.__repr__() now also handles CoroWrapper

parent bb1507fe
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment