Fix CI failing due to Shell Command exception (#52483)

This commit is contained in:
Shay Levy 2021-07-05 11:38:55 +03:00 committed by GitHub
parent 6d9628423c
commit 6fc5a6a065
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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