stepper_enable: Raise an error on bad lookup_enable() call
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
9ff4f1bb2f
commit
8efa5e2db4
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue