From 0c2919b53403ff9bce7773550b7625a021cd663a Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sat, 26 Aug 2017 13:20:16 -0400 Subject: klippy: Move restart logic into Printer() class Move the restart logic out of main() and into Printer.run(). This simplifies the code. Signed-off-by: Kevin O'Connor --- klippy/gcode.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'klippy/gcode.py') diff --git a/klippy/gcode.py b/klippy/gcode.py index a890b94f..b652b919 100644 --- a/klippy/gcode.py +++ b/klippy/gcode.py @@ -114,7 +114,7 @@ class GCodeParser: self.toolhead.force_shutdown() self.respond_error('Internal error on command:"%s"' % (cmd,)) if self.is_fileinput: - self.printer.request_exit('exit_eof') + self.printer.request_exit() break self.ack() self.need_ack = prev_need_ack @@ -141,7 +141,7 @@ class GCodeParser: self.motor_heater_off() if self.toolhead is not None: self.toolhead.wait_moves() - self.printer.request_exit('exit_eof') + self.printer.request_exit() self.is_processing_data = False if self.fd_handle is None: self.fd_handle = self.reactor.register_fd(self.fd, self.process_data) -- cgit v1.2.3-70-g09d2