From 08adecd226b4d712eb900b1768a7a96294a89c20 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 4 Sep 2020 11:49:43 -0400 Subject: homing: Prefer printer.command_error() instead of homing.CommandError() Update callers to use the printer.command_error reference instead of directly using homing.CommandError() when raising or catching errors. Signed-off-by: Kevin O'Connor --- klippy/webhooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'klippy/webhooks.py') diff --git a/klippy/webhooks.py b/klippy/webhooks.py index dfa2a491..1e8022e4 100644 --- a/klippy/webhooks.py +++ b/klippy/webhooks.py @@ -228,7 +228,7 @@ class ClientConnection: try: func = self.webhooks.get_callback(web_request.get_method()) func(web_request) - except homing.CommandError as e: + except self.printer.command_error as e: web_request.set_error(WebRequestError(e.message)) except Exception as e: msg = ("Internal Error on WebRequest: %s" -- cgit v1.2.3-70-g09d2