mirror of https://github.com/python/cpython
(Merge 3.4) asyncio: Task.__repr__() now also handles CoroWrapper
This commit is contained in:
commit
6f3551e15f
|
@ -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…
Reference in New Issue