Catch AsusWRT UnicodeDecodeError in get_nvram call (#51811)

This commit is contained in:
ollo69 2021-06-14 00:20:02 +02:00 committed by GitHub
parent 123e8f01a1
commit 4300484ca0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -424,7 +424,7 @@ async def _get_nvram_info(api: AsusWrt, info_type: str) -> dict[str, Any]:
info = {}
try:
info = await api.async_get_nvram(info_type)
except OSError as exc:
except (OSError, UnicodeDecodeError) as exc:
_LOGGER.warning("Error calling method async_get_nvram(%s): %s", info_type, exc)
return info