aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/gcode.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-09-27 10:05:11 -0400
committerKevin O'Connor <kevin@koconnor.net>2017-09-27 10:05:11 -0400
commit8d04d3d8fd992ee304ea069df203fa7081ee54df (patch)
tree4967b41d3344af969c311287910f394756acc4d4 /klippy/gcode.py
parentf37fc775e539313a649bcc035c385c6d36fb06c2 (diff)
downloadkutter-8d04d3d8fd992ee304ea069df203fa7081ee54df.tar.gz
kutter-8d04d3d8fd992ee304ea069df203fa7081ee54df.tar.xz
kutter-8d04d3d8fd992ee304ea069df203fa7081ee54df.zip
gcode: Exit if a shutdown occurs while running in batch mode
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/gcode.py')
-rw-r--r--klippy/gcode.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/klippy/gcode.py b/klippy/gcode.py
index ccf78fac..49fed250 100644
--- a/klippy/gcode.py
+++ b/klippy/gcode.py
@@ -53,6 +53,8 @@ class GCodeParser:
self.gcode_handlers = self.build_handlers(is_ready)
if not is_ready:
# Printer is shutdown (could be running in a background thread)
+ if self.is_fileinput:
+ self.printer.request_exit()
return
# Lookup printer components
self.toolhead = self.printer.objects.get('toolhead')