Skip to content

Commit

Permalink
Update coordinator.py
Browse files Browse the repository at this point in the history
  • Loading branch information
N3rdix authored Dec 21, 2023
1 parent e50fe79 commit e3b4f26
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion homeassistant/components/version/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from awesomeversion import AwesomeVersion
from pyhaversion import HaVersion, HaVersionSource
from pyhaversion.exceptions import HaVersionException
from pyhaversion.exceptions import HaVersionException, HaVersionTimeoutException

from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
Expand Down Expand Up @@ -51,5 +51,8 @@ async def _async_update_data(self) -> None:
"""Update version data."""
try:
self._version, self._version_data = await self._api.get_version()
except HaVersionTimeoutException as exception:
logger.warning("Updating version timed out: %s", exception)

Check failure on line 55 in homeassistant/components/version/coordinator.py

View workflow job for this annotation

GitHub Actions / Check mypy

Name "logger" is not defined [name-defined]

Check failure on line 55 in homeassistant/components/version/coordinator.py

View workflow job for this annotation

GitHub Actions / Check ruff

Ruff (F821)

homeassistant/components/version/coordinator.py:55:13: F821 Undefined name `logger`
return
except HaVersionException as exception:
raise UpdateFailed(exception) from exception

0 comments on commit e3b4f26

Please sign in to comment.