aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2020-08-04 16:03:20 -0400
committerKevin O'Connor <kevin@koconnor.net>2020-08-06 14:21:08 -0400
commit795bd03b336c34bb09b3dcf190da08d0fa430258 (patch)
tree94e4111436b72edd8874bdbd1852180857c02418
parent4346d37c0662d7d0cae08968e0a5737afcd49c52 (diff)
downloadkutter-795bd03b336c34bb09b3dcf190da08d0fa430258.tar.gz
kutter-795bd03b336c34bb09b3dcf190da08d0fa430258.tar.xz
kutter-795bd03b336c34bb09b3dcf190da08d0fa430258.zip
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>
-rw-r--r--klippy/webhooks.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/klippy/webhooks.py b/klippy/webhooks.py
index 1c3645be..f6491187 100644
--- a/klippy/webhooks.py
+++ b/klippy/webhooks.py
@@ -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