From 5853f3f447549a1ac2c8ab84727c29978dcdc60d Mon Sep 17 00:00:00 2001 From: Arksine Date: Wed, 5 Aug 2020 20:54:37 -0400 Subject: [PATCH] gcode_apis: Add configparser support Signed-off-by: Eric Callahan --- moonraker/plugins/gcode_apis.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/moonraker/plugins/gcode_apis.py b/moonraker/plugins/gcode_apis.py index 197d38c..bfd291e 100644 --- a/moonraker/plugins/gcode_apis.py +++ b/moonraker/plugins/gcode_apis.py @@ -7,8 +7,8 @@ GCODE_ENDPOINT = "gcode/script" class GCodeAPIs: - def __init__(self, server): - self.server = server + def __init__(self, config): + self.server = config.get_server() # Register GCode Endpoints self.server.register_endpoint( @@ -63,5 +63,5 @@ class GCodeAPIs: async def gcode_firmware_restart(self, path, method, args): return await self._send_gcode("FIRMWARE_RESTART") -def load_plugin(server): - return GCodeAPIs(server) +def load_plugin(config): + return GCodeAPIs(config)