mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-19 07:06:30 +00:00
Exit reload early if no mounts (#4338)
* Exit reload early if no mounts * Formatting
This commit is contained in:
parent
9800955646
commit
f4df298cb3
@ -142,6 +142,9 @@ class MountManager(FileConfiguration, CoreSysAttributes):
|
|||||||
@Job(conditions=[JobCondition.MOUNT_AVAILABLE])
|
@Job(conditions=[JobCondition.MOUNT_AVAILABLE])
|
||||||
async def reload(self) -> None:
|
async def reload(self) -> None:
|
||||||
"""Update mounts info via dbus and reload failed mounts."""
|
"""Update mounts info via dbus and reload failed mounts."""
|
||||||
|
if not self.mounts:
|
||||||
|
return
|
||||||
|
|
||||||
await asyncio.wait(
|
await asyncio.wait(
|
||||||
[self.sys_create_task(mount.update()) for mount in self.mounts]
|
[self.sys_create_task(mount.update()) for mount in self.mounts]
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user