diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-09-27 10:05:11 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-09-27 10:05:11 -0400 |
commit | 8d04d3d8fd992ee304ea069df203fa7081ee54df (patch) | |
tree | 4967b41d3344af969c311287910f394756acc4d4 | |
parent | f37fc775e539313a649bcc035c385c6d36fb06c2 (diff) | |
download | kutter-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>
-rw-r--r-- | klippy/gcode.py | 2 |
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') |