mirror of
https://github.com/home-assistant/core.git
synced 2025-11-10 03:19:34 +00:00
Fix deprecated asyncio.wait use with coroutines (#44981)
https://docs.python.org/3/library/asyncio-task.html#asyncio-example-wait-coroutine
This commit is contained in:
@@ -1055,7 +1055,7 @@ class Script:
|
||||
raise
|
||||
|
||||
async def _async_stop(self, update_state):
|
||||
aws = [run.async_stop() for run in self._runs]
|
||||
aws = [asyncio.create_task(run.async_stop()) for run in self._runs]
|
||||
if not aws:
|
||||
return
|
||||
await asyncio.wait(aws)
|
||||
|
||||
Reference in New Issue
Block a user