1
mirror of https://github.com/home-assistant/core synced 2024-07-18 12:02:20 +02:00

Avoid blocking IO in downloader initialization (#114841)

* Avoid blocking IO in downloader initialization

* Avoid blocking IO in downloader initialization
This commit is contained in:
Joost Lekkerkerker 2024-04-04 13:45:44 +02:00 committed by GitHub
parent efde8400e2
commit 28dc77a72d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -83,7 +83,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
if not os.path.isabs(download_path):
download_path = hass.config.path(download_path)
if not os.path.isdir(download_path):
if not await hass.async_add_executor_job(os.path.isdir, download_path):
_LOGGER.error(
"Download path %s does not exist. File Downloader not active", download_path
)