1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-14 06:38:17 +00:00

Print better error message when loader fails with ValueError

This commit is contained in:
Otto Winter 2018-10-07 12:07:32 +02:00
parent 7ce753b76f
commit 7fb1979f16
No known key found for this signature in database
GPG Key ID: DB66C0BE6013F97E

View File

@ -30,6 +30,8 @@ def get_component(domain):
module = importlib.import_module(path)
except ImportError as err:
_LOGGER.debug(err)
except ValueError:
raise ESPHomeYAMLError("Error finding component '{}'.".format(domain))
else:
_COMPONENT_CACHE[domain] = module
return module