From 8efa5e2db4ad63cb2d2fb9cb72cfe348271f4fce Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 14 Nov 2019 18:05:32 -0500 Subject: [PATCH] stepper_enable: Raise an error on bad lookup_enable() call Signed-off-by: Kevin O'Connor --- klippy/extras/stepper_enable.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/klippy/extras/stepper_enable.py b/klippy/extras/stepper_enable.py index e02563fb..a21c0f98 100644 --- a/klippy/extras/stepper_enable.py +++ b/klippy/extras/stepper_enable.py @@ -95,6 +95,8 @@ class PrinterStepperEnable: # Turn off motors self.motor_off() def lookup_enable(self, name): + if name not in self.enable_lines: + raise self.printer.config_error("Unknown stepper '%s'" % (name,)) return self.enable_lines[name] def load_config(config):