Use builtin TimeoutError [socket.timeout] (#109704)

This commit is contained in:
Marc Mueller 2024-02-05 18:46:11 +01:00 committed by GitHub
parent 46f8fb3ac1
commit ed7307cdaf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 19 additions and 43 deletions

View file

@ -2,7 +2,6 @@
from __future__ import annotations
import logging
import socket
from typing import Any
from maxcube.device import (
@ -152,7 +151,7 @@ class MaxCubeClimate(ClimateEntity):
with self._cubehandle.mutex:
try:
self._cubehandle.cube.set_temperature_mode(self._device, temp, mode)
except (socket.timeout, OSError):
except (TimeoutError, OSError):
_LOGGER.error("Setting HVAC mode failed")
@property