mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-23 14:44:20 -06:00
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>
This commit is contained in:
parent
f6dd97b784
commit
08adecd226
8 changed files with 16 additions and 17 deletions
|
@ -4,7 +4,7 @@
|
|||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import math, logging
|
||||
import stepper, homing, chelper
|
||||
import stepper, chelper
|
||||
|
||||
class PrinterExtruder:
|
||||
def __init__(self, config, extruder_num):
|
||||
|
@ -214,6 +214,8 @@ class PrinterExtruder:
|
|||
|
||||
# Dummy extruder class used when a printer has no extruder at all
|
||||
class DummyExtruder:
|
||||
def __init__(self, printer):
|
||||
self.printer = printer
|
||||
def update_move_time(self, flush_time):
|
||||
pass
|
||||
def check_move(self, move):
|
||||
|
@ -223,7 +225,7 @@ class DummyExtruder:
|
|||
def get_name(self):
|
||||
return ""
|
||||
def get_heater(self):
|
||||
raise homing.CommandError("Extruder not configured")
|
||||
raise self.printer.command_error("Extruder not configured")
|
||||
|
||||
def add_printer_objects(config):
|
||||
printer = config.get_printer()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue