]> granicus.if.org Git - python/commitdiff
Issue 24017: Fix asyncio.CoroWrapper to support 'async def' coroutines
authorYury Selivanov <yselivanov@sprymix.com>
Mon, 1 Jun 2015 01:37:09 +0000 (21:37 -0400)
committerYury Selivanov <yselivanov@sprymix.com>
Mon, 1 Jun 2015 01:37:09 +0000 (21:37 -0400)
Lib/asyncio/coroutines.py

index 4933cf83d2638b85c9e3303352d5a276d4b2194c..edb68062107daa7eab559c10759ce22357662426 100644 (file)
@@ -120,7 +120,7 @@ class CoroWrapper:
         __await__ = __iter__ # make compatible with 'await' expression
 
     def __next__(self):
-        return next(self.gen)
+        return self.gen.send(None)
 
     if _YIELD_FROM_BUG:
         # For for CPython issue #21209: using "yield from" and a custom