mirror of
https://github.com/andreili/klipper.git
synced 2025-08-24 03:44:06 +02:00
gcode: Exit if a shutdown occurs while running in batch mode
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
f37fc775e5
commit
8d04d3d8fd
@ -53,6 +53,8 @@ class GCodeParser:
|
|||||||
self.gcode_handlers = self.build_handlers(is_ready)
|
self.gcode_handlers = self.build_handlers(is_ready)
|
||||||
if not is_ready:
|
if not is_ready:
|
||||||
# Printer is shutdown (could be running in a background thread)
|
# Printer is shutdown (could be running in a background thread)
|
||||||
|
if self.is_fileinput:
|
||||||
|
self.printer.request_exit()
|
||||||
return
|
return
|
||||||
# Lookup printer components
|
# Lookup printer components
|
||||||
self.toolhead = self.printer.objects.get('toolhead')
|
self.toolhead = self.printer.objects.get('toolhead')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user