From f3b905c04892c03701ce320119caa52449cad688 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Wed, 10 Nov 2021 09:40:46 +0100 Subject: [PATCH] Fixed python3.9 compat issue in policy daemon. --- modoboa/policyd/management/commands/policy_daemon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modoboa/policyd/management/commands/policy_daemon.py b/modoboa/policyd/management/commands/policy_daemon.py index e0b135853..f0c94edfa 100644 --- a/modoboa/policyd/management/commands/policy_daemon.py +++ b/modoboa/policyd/management/commands/policy_daemon.py @@ -60,7 +60,7 @@ class Command(BaseCommand): server.close() loop.run_until_complete(server.wait_closed()) # Cancel pending tasks - for task in asyncio.Task.all_tasks(): + for task in asyncio.all_tasks(loop): task.cancel() # Await task to execute it's cancellation. Cancelled task # raises asyncio.CancelledError that we can suppress