Skip to content

Commit 3772c91

Browse files
committed
Fix wrap_generator args passthrough.
1 parent e7fc624 commit 3772c91

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

trio_asyncio/base.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,8 @@ async def run_coroutine(self, coro):
213213
coro = asyncio.ensure_future(coro, loop=self)
214214
return await run_future(coro)
215215

216-
def wrap_generator(self, gen):
217-
# if inspect.isasyncgen(f):
218-
# return self.wrap_generator(f)
219-
return run_generator(self, gen())
216+
def wrap_generator(self, gen, *args):
217+
return run_generator(self, gen(*args))
220218

221219
async def run_asyncio(self, proc, *args):
222220
"""Run an asyncio function or method from Trio.

0 commit comments

Comments
 (0)