From fb3706c54f87d4949a76dd64afc18b55fd922830 Mon Sep 17 00:00:00 2001 From: Arksine Date: Wed, 6 Jan 2021 14:00:29 -0500 Subject: [PATCH] paneldue: configure the serial connection last This allows the PanelDue object to be properly cleaned in the event of a configuration error. Signed-off-by: Eric Callahan --- moonraker/plugins/paneldue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moonraker/plugins/paneldue.py b/moonraker/plugins/paneldue.py index c0098bd..8a01236 100644 --- a/moonraker/plugins/paneldue.py +++ b/moonraker/plugins/paneldue.py @@ -143,7 +143,6 @@ class PanelDue: def __init__(self, config): self.server = config.get_server() self.ioloop = IOLoop.current() - self.ser_conn = SerialConnection(config, self) self.file_manager = self.server.lookup_plugin('file_manager') self.klippy_apis = self.server.lookup_plugin('klippy_apis') self.kinematics = "none" @@ -195,6 +194,7 @@ class PanelDue: ntkeys = config.get('non_trivial_keys', "Klipper state") self.non_trivial_keys = [k for k in ntkeys.split('\n') if k.strip()] + self.ser_conn = SerialConnection(config, self) logging.info("PanelDue Configured") # Register server events