Migrate remaining get_platform in config to async_get_platform (#112469)

This was the only remaining case where blocking I/O might have happened
in config. It was unlikely though as async_get_component should have
pre-imported the config platform
pull/112539/head
J. Nick Koston 2024-03-05 18:47:11 -10:00 committed by GitHub
parent 982c8f8f4a
commit 0f69a0647c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -1098,7 +1098,9 @@ async def merge_packages_config(
continue
try:
config_platform: ModuleType | None = integration.get_platform("config")
config_platform: ModuleType | None = (
await integration.async_get_platform("config")
)
# Test if config platform has a config validator
if not hasattr(config_platform, "async_validate_config"):
config_platform = None