From ead418b92242e338fc79ff7997ab5c9af2bd8804 Mon Sep 17 00:00:00 2001 From: Tch1b0 Date: Sun, 10 Mar 2024 14:26:28 +0100 Subject: [PATCH 1/2] FirstAvailableConnector: fix function paramters `asyncio.gather` call --- src/cozmo/run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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): From 04efa93880e303edc7f134a669ae801090ef1d3b Mon Sep 17 00:00:00 2001 From: Tch1b0 Date: Sun, 10 Mar 2024 14:27:01 +0100 Subject: [PATCH 2/2] Dispatcher: fix function parameters for `asyncio.wait_for` call --- src/cozmo/event.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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