1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-22 18:48:14 +00:00

[core] Handle mis-typed platform name more cleanly (#8424)

This commit is contained in:
Clyde Stubbs 2025-03-19 06:42:14 +11:00 committed by GitHub
parent afa481aeea
commit f993bb08c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -189,10 +189,11 @@ def _is_target_platform(name):
from esphome.loader import get_component
try:
if get_component(name, True).is_target_platform:
return True
return get_component(name, True).is_target_platform
except KeyError:
pass
except ImportError:
pass
return False