From: Victor Stinner Date: Mon, 16 Jun 2014 22:26:36 +0000 (+0200) Subject: asyncio: Task.__repr__() now also handles CoroWrapper X-Git-Tag: v3.4.2rc1~376 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bc434e205261fbe9afc45f5f601d2238ffbe09f9;p=thirdparty%2FPython%2Fcpython.git asyncio: Task.__repr__() now also handles CoroWrapper --- diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py index e6fd3d380beb..281bf608e877 100644 --- a/Lib/asyncio/tasks.py +++ b/Lib/asyncio/tasks.py @@ -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)