From 12e8cef6773a4789bbdc1b3609c5b94c28216d29 Mon Sep 17 00:00:00 2001 From: Rogier van Staveren Date: Tue, 3 Jan 2023 22:05:53 +0100 Subject: [PATCH] Fix pylint issue --- custom_components/xyscreens/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/custom_components/xyscreens/__init__.py b/custom_components/xyscreens/__init__.py index 27f818a..74cccbb 100644 --- a/custom_components/xyscreens/__init__.py +++ b/custom_components/xyscreens/__init__.py @@ -43,10 +43,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: connection.close() _LOGGER.info("Device %s is available", serial_port) - except serial.SerialException as e: + except serial.SerialException as ex: raise ConfigEntryNotReady( - f"Unable to connect to device {serial_port}: {e}" - ) from e + f"Unable to connect to device {serial_port}: {ex}" + ) from ex hass.data.setdefault(DOMAIN, {})[entry.entry_id] = entry.data