diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-02-05 14:01:24 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-02-06 12:17:50 -0500 |
commit | 667b72870f122c5cb08a3abf7c692f824e24383c (patch) | |
tree | 1a6ce839f3a3e2755f9af272ca0f702e606d6229 /klippy/gcode.py | |
parent | 4194ebf9df4bc2e1395859e9de5b003d0008cafa (diff) | |
download | kutter-667b72870f122c5cb08a3abf7c692f824e24383c.tar.gz kutter-667b72870f122c5cb08a3abf7c692f824e24383c.tar.xz kutter-667b72870f122c5cb08a3abf7c692f824e24383c.zip |
gcode: Exit on an unhandled exception when reading from a file
When testing via a gcode input file, it's easier to debug problems if
the program exits upon the first exception.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/gcode.py')
-rw-r--r-- | klippy/gcode.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/klippy/gcode.py b/klippy/gcode.py index 2225c92c..407390e1 100644 --- a/klippy/gcode.py +++ b/klippy/gcode.py @@ -114,6 +114,9 @@ class GCodeParser: logging.exception("Exception in command handler") self.toolhead.force_shutdown() self.respond_error('Internal error on command:"%s"' % (cmd,)) + if self.is_fileinput: + self.printer.request_exit_eof() + break self.ack() def process_data(self, eventtime): data = os.read(self.fd, 4096) |