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
This commit is contained in:
Matthias Urlichs 2018-11-08 12:59:58 +01:00 committed by Paulus Schoutsen
parent f7f0a4e811
commit 9472529d43
1 changed files with 3 additions and 2 deletions

View File

@ -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.
"""