From 75f95264f368bd8d20f30283beae6687da6d5288 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Thu, 26 Jan 2023 06:02:46 +0100 Subject: [PATCH] One more place to wrap coroutine in Task before passing to asyncio.wait Needed in Python 3.11+. QubesOS/qubes-issues#6982 --- qubes/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qubes/app.py b/qubes/app.py index dc4ce3217..f85b4848e 100644 --- a/qubes/app.py +++ b/qubes/app.py @@ -1412,7 +1412,8 @@ async def stop(i): async with i.startup_lock: if not i.is_running(): await i.storage.stop() - future = tuple(stop(i) for i in self.domains if i.klass != 'AdminVM') + future = tuple(asyncio.create_task(stop(i)) for i in self.domains + if i.klass != 'AdminVM') finished = () while future: qubes.utils.systemd_extend_timeout()