From 8d4982d440de5fcc7fdeaab5a5a3533e2a3d93da Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Tue, 14 Dec 2021 12:58:55 +0800 Subject: [PATCH] try asyncio.run again because asyncio.get_event_loop() is deprecated. --- nvchecker/__main__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nvchecker/__main__.py b/nvchecker/__main__.py index 3f25ff5..2fc5ca5 100755 --- a/nvchecker/__main__.py +++ b/nvchecker/__main__.py @@ -76,9 +76,7 @@ def main() -> None: result_coro = core.process_result(oldvers, result_q, entry_waiter) runner_coro = core.run_tasks(futures) - # asyncio.run doesn't work because it always creates new eventloops - loop = asyncio.get_event_loop() - newvers = loop.run_until_complete(run(result_coro, runner_coro)) + newvers = asyncio.run(run(result_coro, runner_coro)) if options.ver_files is not None: core.write_verfile(options.ver_files[1], newvers)