aboutsummaryrefslogtreecommitdiffstats
path: root/klippy
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-03-16 01:08:26 -0400
committerKevin O'Connor <kevin@koconnor.net>2017-03-16 13:15:25 -0400
commit9bb8b0c622bf5cba38e5e2c4b59b466444e572d7 (patch)
tree048dd762386f6c07c340d9fdec364f9395cc5e3b /klippy
parentdf6d3107f2b9948bc9dc28c4a1dd6a9ea9fda0fe (diff)
downloadkutter-9bb8b0c622bf5cba38e5e2c4b59b466444e572d7.tar.gz
kutter-9bb8b0c622bf5cba38e5e2c4b59b466444e572d7.tar.xz
kutter-9bb8b0c622bf5cba38e5e2c4b59b466444e572d7.zip
toolhead: Don't raise exception from force_shutdown
Catch and ignore any exceptions when trying to shutdown the printer in toolhead.force_shutdown() - there's a good chance an exception will be raised as this method is often called after an invalid internal state is found. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy')
-rw-r--r--klippy/toolhead.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/klippy/toolhead.py b/klippy/toolhead.py
index edd24bc3..95aceafa 100644
--- a/klippy/toolhead.py
+++ b/klippy/toolhead.py
@@ -365,6 +365,9 @@ class ToolHead:
return "print_time=%.3f buffer_time=%.3f print_stall=%d" % (
print_time, buffer_time, self.print_stall)
def force_shutdown(self):
- self.printer.mcu.force_shutdown()
- self.move_queue.reset()
- self.reset_print_time()
+ try:
+ self.printer.mcu.force_shutdown()
+ self.move_queue.reset()
+ self.reset_print_time()
+ except:
+ logging.exception("Exception in force_shutdown")