Skip to content

Commit 6538c9f

Browse files
committed
run installed_version as executor job
1 parent b8f52e3 commit 6538c9f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

custom_components/pyscript/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,9 @@ async def install_requirements(hass):
307307
# Attempt to get version of package. Do nothing if it's found since
308308
# we want to use the version that's already installed to be safe
309309
requirement = pkg_resources.Requirement.parse(pkg)
310-
requirement_installed_version = installed_version(requirement.project_name)
310+
requirement_installed_version = await hass.async_add_executor_job(
311+
installed_version, requirement.project_name
312+
)
311313

312314
if requirement_installed_version in requirement:
313315
_LOGGER.debug("`%s` already found", requirement.project_name)

0 commit comments

Comments
 (0)