From 6fc5a6a065bf54fe4f90b5491c3513f3dc06b041 Mon Sep 17 00:00:00 2001 From: Shay Levy Date: Mon, 5 Jul 2021 11:38:55 +0300 Subject: [PATCH] Fix CI failing due to Shell Command exception (#52483) --- homeassistant/components/shell_command/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/homeassistant/components/shell_command/__init__.py b/homeassistant/components/shell_command/__init__.py index dc0deef1b82..48744b4fea2 100644 --- a/homeassistant/components/shell_command/__init__.py +++ b/homeassistant/components/shell_command/__init__.py @@ -92,6 +92,9 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: if process: with suppress(TypeError): process.kill() + # https://bugs.python.org/issue43884 + # pylint: disable=protected-access + process._transport.close() # type: ignore[attr-defined] del process return