1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-27 05:57:09 +00:00

Exit reload early if no mounts (#4338)

* Exit reload early if no mounts

* Formatting
This commit is contained in:
Mike Degatano
2023-06-05 10:40:16 -04:00
committed by GitHub
parent 9800955646
commit f4df298cb3

View File

@@ -142,6 +142,9 @@ class MountManager(FileConfiguration, CoreSysAttributes):
@Job(conditions=[JobCondition.MOUNT_AVAILABLE])
async def reload(self) -> None:
"""Update mounts info via dbus and reload failed mounts."""
if not self.mounts:
return
await asyncio.wait(
[self.sys_create_task(mount.update()) for mount in self.mounts]
)