Fixed python3.9 compat issue in policy daemon.

This commit is contained in:
Antoine Nguyen
2021-11-10 09:40:46 +01:00
parent 15be042bac
commit f3b905c048
@@ -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