Report *which* component didn't return a bool (#18258)

* Report *which* component didn't return a bool

* break over-long line
This commit is contained in:
Matthias Urlichs 2018-11-06 12:41:39 +01:00 committed by Paulus Schoutsen
parent b506aafbb4
commit 4581a741bd

View File

@ -160,8 +160,8 @@ async def _async_setup_component(hass: core.HomeAssistant,
log_error("Component failed to initialize.")
return False
if result is not True:
log_error("Component did not return boolean if setup was successful. "
"Disabling component.")
log_error("Component {!r} did not return boolean if setup was "
"successful. Disabling component.".format(domain))
loader.set_component(hass, domain, None)
return False