From 8d5a9143bb550966c0b43ee4624c49bfaaa55a8c Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 27 Sep 2017 11:43:14 -0400 Subject: klippy: Avoid using '%' syntax when calling logging module The logging module can build strings directly from printf syntax - no need to build the string first. Signed-off-by: Kevin O'Connor --- klippy/stepper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'klippy/stepper.py') diff --git a/klippy/stepper.py b/klippy/stepper.py index 8ccec18f..ab1af2ba 100644 --- a/klippy/stepper.py +++ b/klippy/stepper.py @@ -91,7 +91,7 @@ class PrinterHomingStepper(PrinterStepper): endstop_accuracy * self.inv_step_dist)) if self.homing_endstop_accuracy >= self.homing_stepper_phases // 2: logging.info("Endstop for %s is not accurate enough for stepper" - " phase adjustment" % (name,)) + " phase adjustment", name) self.homing_stepper_phases = None if self.mcu_endstop.get_mcu().is_fileoutput(): self.homing_endstop_accuracy = self.homing_stepper_phases @@ -108,7 +108,7 @@ class PrinterHomingStepper(PrinterStepper): pos = self.mcu_stepper.get_mcu_position() pos %= self.homing_stepper_phases if self.homing_endstop_phase is None: - logging.info("Setting %s endstop phase to %d" % (self.name, pos)) + logging.info("Setting %s endstop phase to %d", self.name, pos) self.homing_endstop_phase = pos return 0 delta = (pos - self.homing_endstop_phase) % self.homing_stepper_phases -- cgit v1.2.3-70-g09d2