mirror of
https://github.com/esphome/esphome.git
synced 2025-09-08 06:12:20 +01:00
Sun support (#531)
* Sun * Add sun support * Lint * Updates * Fix elevation * Lint * Update mqtt_climate.cpp
This commit is contained in:
@@ -119,15 +119,14 @@ def _lookup_module(domain, is_platform):
|
||||
path = 'esphome.components.{}'.format(domain)
|
||||
try:
|
||||
module = importlib.import_module(path)
|
||||
except ImportError:
|
||||
import traceback
|
||||
_LOGGER.error("Unable to import component %s:", domain)
|
||||
traceback.print_exc()
|
||||
except ImportError as e:
|
||||
if 'No module named' in str(e):
|
||||
_LOGGER.error("Unable to import component %s:", domain)
|
||||
else:
|
||||
_LOGGER.error("Unable to import component %s:", domain, exc_info=True)
|
||||
return None
|
||||
except Exception: # pylint: disable=broad-except
|
||||
import traceback
|
||||
_LOGGER.error("Unable to load component %s:", domain)
|
||||
traceback.print_exc()
|
||||
_LOGGER.error("Unable to load component %s:", domain, exc_info=True)
|
||||
return None
|
||||
else:
|
||||
manif = ComponentManifest(module, CORE_COMPONENTS_PATH, is_platform=is_platform)
|
||||
|
Reference in New Issue
Block a user