mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-08 07:27:43 -06:00
klippy: Return an error code if batch input results in an error
When reading from a debug input file, propagate any errors to the program return status. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
efe63d5efe
commit
780e3c3022
2 changed files with 21 additions and 11 deletions
|
@ -105,7 +105,7 @@ class GCodeParser:
|
|||
self.gcode_handlers = self.base_gcode_handlers
|
||||
self.dump_debug()
|
||||
if self.is_fileinput:
|
||||
self.printer.request_exit()
|
||||
self.printer.request_exit('error_exit')
|
||||
return
|
||||
if state != 'ready':
|
||||
return
|
||||
|
@ -264,6 +264,8 @@ class GCodeParser:
|
|||
if len(lines) > 1:
|
||||
self.respond_info("\n".join(lines))
|
||||
self.respond('!! %s' % (lines[0].strip(),))
|
||||
if self.is_fileinput:
|
||||
self.printer.request_exit('error_exit')
|
||||
# Parameter parsing helpers
|
||||
class sentinel: pass
|
||||
def get_str(self, name, params, default=sentinel, parser=str,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue