mirror of https://github.com/Desuuuu/klipper.git
webhooks: Directly invoke printer.invoke_shutdown()
No need to indirectly shutdown via the gcode class - just call printer.invoke_shutdown() directly. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
4346d37c06
commit
795bd03b33
|
@ -255,8 +255,7 @@ class WebHooks:
|
|||
def _handle_estop_request(self, web_request):
|
||||
if web_request.get_method() != 'POST':
|
||||
raise web_request.error("Invalid Request Method")
|
||||
gcode = self.printer.lookup_object('gcode')
|
||||
gcode.cmd_M112(None)
|
||||
self.printer.invoke_shutdown("Shutdown due to webhooks request")
|
||||
|
||||
def get_connection(self):
|
||||
return self.sconn
|
||||
|
|
Loading…
Reference in New Issue