From 855e9367d48f2d428c7391358a660921ff02f367 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Mon, 13 May 2019 12:04:50 +0200 Subject: [PATCH] Update config.py --- esphome/config.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/esphome/config.py b/esphome/config.py index 7ad707ee0d..3333712aad 100644 --- a/esphome/config.py +++ b/esphome/config.py @@ -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