mirror of
https://github.com/andreili/klipper.git
synced 2025-08-23 19:34:06 +02:00
output_pin: Fix handling of template rendering errors
Make sure to assign 'value' on a rendering error to avoid an internal error. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
310747a636
commit
59ebdce605
@ -228,6 +228,7 @@ class PrinterOutputPin:
|
|||||||
value = float(text)
|
value = float(text)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
logging.exception("output_pin template render error")
|
logging.exception("output_pin template render error")
|
||||||
|
value = 0.
|
||||||
self.gcrq.send_async_request(value)
|
self.gcrq.send_async_request(value)
|
||||||
cmd_SET_PIN_help = "Set the value of an output pin"
|
cmd_SET_PIN_help = "Set the value of an output pin"
|
||||||
def cmd_SET_PIN(self, gcmd):
|
def cmd_SET_PIN(self, gcmd):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user