aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Bronder <jsbronder@cold-front.org>2021-10-19 10:06:16 -1000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-23 17:47:26 +0100
commit74a1e71b1e677a482fdedc685a71a1798ad63920 (patch)
tree9c37407a3fe9b7b233d6967ca9739fa7ba201580
parent1c422329c3b88a91a6faeacbba3b6104d66ba7a1 (diff)
downloadbitbake-contrib-74a1e71b1e677a482fdedc685a71a1798ad63920.tar.gz
hashserv: let asyncio discover the running loop
>From 3.10 documentation [1]: Deprecated since version 3.8, removed in version 3.10: The loop parameter. This function has been implicitly getting the current running loop since 3.7 This is fixed in master as a side-effect of cf9bc0310b0092bf52b61057405aeb51c86ba137 which is more intrusive but likewise drops the loop parameter. 1. https://docs.python.org/3/library/asyncio-stream.html#asyncio.open_connection Signed-off-by: Justin Bronder <jsbronder@cold-front.org> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/hashserv/server.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/hashserv/server.py b/lib/hashserv/server.py
index 81050715e..56f354bd0 100644
--- a/lib/hashserv/server.py
+++ b/lib/hashserv/server.py
@@ -420,7 +420,7 @@ class Server(object):
def start_tcp_server(self, host, port):
self.server = self.loop.run_until_complete(
- asyncio.start_server(self.handle_client, host, port, loop=self.loop)
+ asyncio.start_server(self.handle_client, host, port)
)
for s in self.server.sockets:
@@ -445,7 +445,7 @@ class Server(object):
# Work around path length limits in AF_UNIX
os.chdir(os.path.dirname(path))
self.server = self.loop.run_until_complete(
- asyncio.start_unix_server(self.handle_client, os.path.basename(path), loop=self.loop)
+ asyncio.start_unix_server(self.handle_client, os.path.basename(path))
)
finally:
os.chdir(cwd)