From 06ffd600fb6774eb953af57f0b1810cc7dee0882 Mon Sep 17 00:00:00 2001 From: Seyyed Date: Tue, 23 Aug 2022 01:06:05 +0430 Subject: [PATCH] fix for issue #215, #216, and #218 --- src/cozmo/event.py | 2 +- src/cozmo/run.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cozmo/event.py b/src/cozmo/event.py index 4917f36b..a277189b 100644 --- a/src/cozmo/event.py +++ b/src/cozmo/event.py @@ -485,7 +485,7 @@ async def wait_for(self, event_or_filter, timeout=30): self.add_event_handler(event, f) if timeout: - return await asyncio.wait_for(f, timeout, loop=self._loop) + return await asyncio.wait_for(f, timeout) return await f diff --git a/src/cozmo/run.py b/src/cozmo/run.py index 673101a2..440aa738 100644 --- a/src/cozmo/run.py +++ b/src/cozmo/run.py @@ -361,7 +361,7 @@ def __init__(self): async def _do_connect(self, connector,loop, protocol_factory, conn_check): connect = connector.connect(loop, protocol_factory, conn_check) - result = await asyncio.gather(connect, loop=loop, return_exceptions=True) + result = await asyncio.gather(connect, return_exceptions=True) return result[0] async def connect(self, loop, protocol_factory, conn_check):