[Python-checkins] cpython (3.4): asyncio: Task.__repr__() now also handles CoroWrapper
victor.stinner
python-checkins at python.org
Tue Jun 17 00:27:48 CEST 2014
http://hg.python.org/cpython/rev/38703604a7e4
changeset: 91221:38703604a7e4
branch: 3.4
parent: 91219:1536085d4a94
user: Victor Stinner <victor.stinner at gmail.com>
date: Tue Jun 17 00:26:36 2014 +0200
summary:
asyncio: Task.__repr__() now also handles CoroWrapper
files:
Lib/asyncio/tasks.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py
--- a/Lib/asyncio/tasks.py
+++ b/Lib/asyncio/tasks.py
@@ -190,7 +190,7 @@
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)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list