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):
|
def _handle_estop_request(self, web_request):
|
||||||
if web_request.get_method() != 'POST':
|
if web_request.get_method() != 'POST':
|
||||||
raise web_request.error("Invalid Request Method")
|
raise web_request.error("Invalid Request Method")
|
||||||
gcode = self.printer.lookup_object('gcode')
|
self.printer.invoke_shutdown("Shutdown due to webhooks request")
|
||||||
gcode.cmd_M112(None)
|
|
||||||
|
|
||||||
def get_connection(self):
|
def get_connection(self):
|
||||||
return self.sconn
|
return self.sconn
|
||||||
|
|
Loading…
Reference in New Issue