mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Avoid leaking exception trace for philips_js (#97491)
Avoid leaking exception trace
This commit is contained in:
parent
787486b68d
commit
651d4134cf
@ -7,7 +7,12 @@ from datetime import timedelta
|
|||||||
import logging
|
import logging
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from haphilipsjs import AutenticationFailure, ConnectionFailure, PhilipsTV
|
from haphilipsjs import (
|
||||||
|
AutenticationFailure,
|
||||||
|
ConnectionFailure,
|
||||||
|
GeneralFailure,
|
||||||
|
PhilipsTV,
|
||||||
|
)
|
||||||
from haphilipsjs.typing import SystemType
|
from haphilipsjs.typing import SystemType
|
||||||
|
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
@ -22,7 +27,7 @@ from homeassistant.core import HomeAssistant, callback
|
|||||||
from homeassistant.exceptions import ConfigEntryAuthFailed
|
from homeassistant.exceptions import ConfigEntryAuthFailed
|
||||||
from homeassistant.helpers.debounce import Debouncer
|
from homeassistant.helpers.debounce import Debouncer
|
||||||
from homeassistant.helpers.entity import DeviceInfo
|
from homeassistant.helpers.entity import DeviceInfo
|
||||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
|
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
|
||||||
|
|
||||||
from .const import CONF_ALLOW_NOTIFY, CONF_SYSTEM, DOMAIN
|
from .const import CONF_ALLOW_NOTIFY, CONF_SYSTEM, DOMAIN
|
||||||
|
|
||||||
@ -187,3 +192,5 @@ class PhilipsTVDataUpdateCoordinator(DataUpdateCoordinator[None]):
|
|||||||
pass
|
pass
|
||||||
except AutenticationFailure as exception:
|
except AutenticationFailure as exception:
|
||||||
raise ConfigEntryAuthFailed(str(exception)) from exception
|
raise ConfigEntryAuthFailed(str(exception)) from exception
|
||||||
|
except GeneralFailure as exception:
|
||||||
|
raise UpdateFailed(str(exception)) from exception
|
||||||
|
Loading…
x
Reference in New Issue
Block a user