From bc434e205261fbe9afc45f5f601d2238ffbe09f9 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 17 Jun 2014 00:26:36 +0200 Subject: [PATCH] asyncio: Task.__repr__() now also handles CoroWrapper --- Lib/asyncio/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py index e6fd3d380b..281bf608e8 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) -- 2.40.0