Update config.py

This commit is contained in:
Otto Winter 2019-05-13 12:04:50 +02:00
parent db0dd6af09
commit 855e9367d4
No known key found for this signature in database
GPG Key ID: DB66C0BE6013F97E

View File

@ -155,9 +155,7 @@ def _lookup_module(domain, is_platform):
try:
module = importlib.import_module('esphome.components.{}'.format(domain))
except ImportError as e:
if 'No module named' in str(e):
_LOGGER.error("Unable to import component %s:", domain)
else:
if 'No module named' not in str(e):
_LOGGER.error("Unable to import component %s:", domain, exc_info=True)
return None
except Exception: # pylint: disable=broad-except