From 566df69ca5127db0575e8f1a451bcb619c70ae4a Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Wed, 23 Jun 2021 14:31:15 -0400 Subject: [PATCH] moonraker: expose additional app methods Add references to the application's "get_websocket_manager" and "register_api_transport" methods. Signed-off-by: Eric Callahan --- moonraker/moonraker.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/moonraker/moonraker.py b/moonraker/moonraker.py index 102affc..f542698 100755 --- a/moonraker/moonraker.py +++ b/moonraker/moonraker.py @@ -40,7 +40,7 @@ from typing import ( TypeVar, ) if TYPE_CHECKING: - from websockets import WebRequest, WebSocket, Subscribable + from websockets import WebRequest, Subscribable from components.data_store import DataStore from components.klippy_apis import KlippyAPI from components.file_manager import FileManager @@ -102,6 +102,8 @@ class Server: self.register_endpoint = app.register_local_handler self.register_static_file_handler = app.register_static_file_handler self.register_upload_handler = app.register_upload_handler + self.get_websocket_manager = app.get_websocket_manager + self.register_api_transport = app.register_api_transport self.ioloop = IOLoop.current() self.register_endpoint( @@ -230,7 +232,7 @@ class Server: event_name: str, notify_name: Optional[str] = None ) -> None: - wsm = self.moonraker_app.get_websocket_manager() + wsm = self.get_websocket_manager() wsm.register_notification(event_name, notify_name) def register_event_handler(self,