mirror of
https://github.com/home-assistant/core
synced 2024-09-03 08:14:07 +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:
parent
efde8400e2
commit
28dc77a72d
@ -83,7 +83,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
if not os.path.isabs(download_path):
|
if not os.path.isabs(download_path):
|
||||||
download_path = hass.config.path(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(
|
_LOGGER.error(
|
||||||
"Download path %s does not exist. File Downloader not active", download_path
|
"Download path %s does not exist. File Downloader not active", download_path
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user