moonraker: perform install validation

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2022-08-14 07:56:58 -04:00 committed by Eric Callahan
parent 6e56815b42
commit 5259a6fd0a
1 changed files with 5 additions and 0 deletions

View File

@ -40,6 +40,7 @@ from typing import (
if TYPE_CHECKING:
from websockets import WebRequest, WebsocketManager
from components.file_manager.file_manager import FileManager
from components.machine import Machine
FlexCallback = Callable[..., Optional[Coroutine]]
_T = TypeVar("_T")
@ -162,6 +163,10 @@ class Server:
if not self.warnings:
await self.event_loop.run_in_thread(self.config.create_backup)
machine: Machine = self.lookup_component("machine")
if await machine.validate_installation():
return
if start_server:
await self.start_server()