mirror of
https://github.com/home-assistant/supervisor.git
synced 2026-02-15 07:27:13 +00:00
Fix blocking I/O call in DBusManager.load() (#6346)
Wrap SOCKET_DBUS.exists() call in sys_run_in_executor to avoid blocking os.stat() call in async context. This follows the same pattern already used in supervisor/resolution/evaluations/dbus.py. Fixes SUPERVISOR-11HC 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -115,7 +115,7 @@ class DBusManager(CoreSysAttributes):
|
||||
|
||||
async def load(self) -> None:
|
||||
"""Connect interfaces to D-Bus."""
|
||||
if not SOCKET_DBUS.exists():
|
||||
if not await self.sys_run_in_executor(SOCKET_DBUS.exists):
|
||||
_LOGGER.error(
|
||||
"No D-Bus support on Host. Disabled any kind of host control!"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user