aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/webhooks.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2020-09-04 11:49:43 -0400
committerKevin O'Connor <kevin@koconnor.net>2020-09-04 12:10:36 -0400
commit08adecd226b4d712eb900b1768a7a96294a89c20 (patch)
treef264d23bcbf096388e35345d525bcac3afa5bdd6 /klippy/webhooks.py
parentf6dd97b78443548c236038ce50a69c24866e156d (diff)
downloadkutter-08adecd226b4d712eb900b1768a7a96294a89c20.tar.gz
kutter-08adecd226b4d712eb900b1768a7a96294a89c20.tar.xz
kutter-08adecd226b4d712eb900b1768a7a96294a89c20.zip
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 <kevin@koconnor.net>
Diffstat (limited to 'klippy/webhooks.py')
-rw-r--r--klippy/webhooks.py2
1 files changed, 1 insertions, 1 deletions
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"