Catch import error when processing config (#23833)

pull/23843/head
Paulus Schoutsen 2019-05-12 23:54:55 -07:00 committed by GitHub
parent e687848152
commit b8f6d824fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -770,7 +770,11 @@ async def async_process_component_config(
This method must be run in the event loop.
"""
domain = integration.domain
component = integration.get_component()
try:
component = integration.get_component()
except ImportError as ex:
_LOGGER.error("Unable to import %s: %s", domain, ex)
return None
if hasattr(component, 'CONFIG_SCHEMA'):
try: