mirror of
https://github.com/andreili/klipper.git
synced 2025-08-23 19:34:06 +02:00
fan_generic: 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
a3b4b39ff1
commit
310747a636
@ -29,6 +29,7 @@ class PrinterFanGeneric:
|
||||
value = float(text)
|
||||
except ValueError as e:
|
||||
logging.exception("fan_generic template render error")
|
||||
value = 0.
|
||||
self.fan.set_speed(value)
|
||||
def cmd_SET_FAN_SPEED(self, gcmd):
|
||||
speed = gcmd.get_float('SPEED', None, 0.)
|
||||
|
Loading…
x
Reference in New Issue
Block a user