mirror of
https://github.com/home-assistant/supervisor
synced 2024-07-11 06:27:55 +02:00
Handle EOFError with dbus-next (#3246)
This commit is contained in:
parent
36ea8b2bb4
commit
f864613ffb
@ -90,6 +90,7 @@ class DBus:
|
|||||||
except Exception as err:
|
except Exception as err:
|
||||||
raise DBusFatalError() from err
|
raise DBusFatalError() from err
|
||||||
|
|
||||||
|
for _ in range(3):
|
||||||
try:
|
try:
|
||||||
introspection = await self._bus.introspect(
|
introspection = await self._bus.introspect(
|
||||||
self.bus_name, self.object_path, timeout=10
|
self.bus_name, self.object_path, timeout=10
|
||||||
@ -97,6 +98,14 @@ class DBus:
|
|||||||
except InvalidIntrospectionError as err:
|
except InvalidIntrospectionError as err:
|
||||||
_LOGGER.error("Can't parse introspect data: %s", err)
|
_LOGGER.error("Can't parse introspect data: %s", err)
|
||||||
raise DBusParseError() from err
|
raise DBusParseError() from err
|
||||||
|
except EOFError:
|
||||||
|
_LOGGER.warning(
|
||||||
|
"Busy system at %s - %s", self.bus_name, self.object_path
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
break
|
||||||
|
|
||||||
|
await asyncio.sleep(3)
|
||||||
|
|
||||||
self._add_interfaces(introspection)
|
self._add_interfaces(introspection)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user