diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2020-08-04 16:03:20 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2020-08-06 14:21:08 -0400 |
commit | 795bd03b336c34bb09b3dcf190da08d0fa430258 (patch) | |
tree | 94e4111436b72edd8874bdbd1852180857c02418 /klippy/webhooks.py | |
parent | 4346d37c0662d7d0cae08968e0a5737afcd49c52 (diff) | |
download | kutter-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>
Diffstat (limited to 'klippy/webhooks.py')
-rw-r--r-- | klippy/webhooks.py | 3 |
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 |