From ba3416b724699d00bd0824ed764f18a1aa3b3884 Mon Sep 17 00:00:00 2001 From: maurerle Date: Tue, 22 Jun 2021 20:54:27 +0200 Subject: [PATCH] Handle ConnectionError if proxmoxve host is not reachable (#51970) * handle ConnectionError if host is not reachable * import only needed exceptions fix pylint issue * don't overwrite built-in ConnectionError * fix typo --- homeassistant/components/proxmoxve/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/homeassistant/components/proxmoxve/__init__.py b/homeassistant/components/proxmoxve/__init__.py index 5777bb3054c..1b0d07c69a3 100644 --- a/homeassistant/components/proxmoxve/__init__.py +++ b/homeassistant/components/proxmoxve/__init__.py @@ -124,6 +124,9 @@ async def async_setup(hass: HomeAssistant, config: dict): except ConnectTimeout: _LOGGER.warning("Connection to host %s timed out during setup", host) continue + except requests.exceptions.ConnectionError: + _LOGGER.warning("Host %s is not reachable", host) + continue hass.data[PROXMOX_CLIENTS][host] = proxmox_client