mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 02:49:40 +00:00
check_config check bootstrap errors (#12291)
This commit is contained in:
committed by
Paulus Schoutsen
parent
fe1a85047e
commit
65c6f72c9d
@@ -30,6 +30,8 @@ MOCKS = {
|
||||
config_util._log_pkg_error),
|
||||
'logger_exception': ("homeassistant.setup._LOGGER.error",
|
||||
setup._LOGGER.error),
|
||||
'logger_exception_bootstrap': ("homeassistant.bootstrap._LOGGER.error",
|
||||
bootstrap._LOGGER.error),
|
||||
}
|
||||
SILENCE = (
|
||||
'homeassistant.bootstrap.clear_secret_cache',
|
||||
@@ -229,6 +231,11 @@ def check(config_path):
|
||||
res['except'].setdefault(ERROR_STR, []).append(msg % params)
|
||||
MOCKS['logger_exception'][1](msg, *params)
|
||||
|
||||
def mock_logger_exception_bootstrap(msg, *params):
|
||||
"""Log logger.exceptions."""
|
||||
res['except'].setdefault(ERROR_STR, []).append(msg % params)
|
||||
MOCKS['logger_exception_bootstrap'][1](msg, *params)
|
||||
|
||||
# Patches to skip functions
|
||||
for sil in SILENCE:
|
||||
PATCHES[sil] = patch(sil)
|
||||
|
||||
Reference in New Issue
Block a user