(Merge 3.4) asyncio: Task.__repr__() now also handles CoroWrapper

This commit is contained in:
Victor Stinner 2014-06-17 00:27:02 +02:00
commit 6f3551e15f
1 changed files with 1 additions and 1 deletions

View File

@ -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)