From 9472529d43ac0b3f60c307c42e007606003e690c Mon Sep 17 00:00:00 2001 From: Matthias Urlichs Date: Thu, 8 Nov 2018 12:59:58 +0100 Subject: [PATCH] Doc fix: a circular dependency does not raise an error. (#18298) This is easier to handle than raising an exception: a circular dependency causes multiple error entries in the log, which is what we want. This is harder to achieve with an exception. Since there is only one user of this code, I choose to fix the documentation -- instead of adding a lot of mostly-useless exception handling. Closes: #13147 --- homeassistant/loader.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/loader.py b/homeassistant/loader.py index 6fb003926e1d..61aacd3b2339 100644 --- a/homeassistant/loader.py +++ b/homeassistant/loader.py @@ -209,8 +209,9 @@ def load_order_component(hass, # type: HomeAssistant comp_name: str) -> OrderedSet: """Return an OrderedSet of components in the correct order of loading. - Raises HomeAssistantError if a circular dependency is detected. - Returns an empty list if component could not be loaded. + Returns an empty list if a circular dependency is detected + or the component could not be loaded. In both cases, the error is + logged. Async friendly. """