This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git


The following commit(s) were added to refs/heads/master by this push:
     new cc41f2c  Simplify
cc41f2c is described below

commit cc41f2cb0511a50dba70c04f0681c673d9a0739c
Author: Sebb <[email protected]>
AuthorDate: Mon Dec 20 12:32:01 2021 +0000

    Simplify
---
 server/main.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/server/main.py b/server/main.py
index 96d5a4d..7288429 100644
--- a/server/main.py
+++ b/server/main.py
@@ -191,7 +191,7 @@ class Server(plugins.server.BaseServer):
                 headers=headers, status=404, text="API Endpoint not found!"
             )
 
-    async def server_loop(self, _loop: asyncio.AbstractEventLoop):  # Note, 
loop never used.
+    async def server_loop(self):
         self.server = aiohttp.web.Server(self.handle_request)
         runner = aiohttp.web.ServerRunner(self.server)
         await runner.setup()
@@ -208,7 +208,7 @@ class Server(plugins.server.BaseServer):
     def run(self):
         loop = asyncio.get_event_loop()
         try:
-            loop.run_until_complete(self.server_loop(loop))
+            loop.run_until_complete(self.server_loop())
         except KeyboardInterrupt:
             pass
         loop.close()
@@ -234,5 +234,4 @@ if __name__ == "__main__":
         help="api log level (e.g. INFO or DEBUG)",
     )
     cliargs = parser.parse_args()
-    pubsub_server = Server(cliargs)
-    pubsub_server.run()
+    Server(cliargs).run()

Reply via email to