moonraker: prevent duplicate failed components

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2021-11-25 17:15:58 -05:00
parent 2a0be55a8d
commit f0831cbe3c

View File

@ -239,6 +239,7 @@ class Server:
except Exception:
msg = f"Unable to load component: ({component_name})"
logging.exception(msg)
if component_name not in self.failed_components:
self.failed_components.append(component_name)
if isinstance(default, SentinelClass):
raise ServerError(msg)