From 82684780060d5008373457dc9140fa60f3b11847 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 13 May 2022 13:53:17 -0400 Subject: [PATCH] homing: Fix bug in multi_complete() Reported by @skrogh. Signed-off-by: Kevin O'Connor --- klippy/extras/homing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/klippy/extras/homing.py b/klippy/extras/homing.py index ff20a8e3..634ad81b 100644 --- a/klippy/extras/homing.py +++ b/klippy/extras/homing.py @@ -18,7 +18,8 @@ def multi_complete(printer, completions): cp = reactor.register_callback(lambda e: [c.wait() for c in completions]) # If any completion indicates an error, then exit main completion early for c in completions: - reactor.register_callback(lambda e: cp.complete(1) if c.wait() else 0) + reactor.register_callback( + lambda e, c=c: cp.complete(1) if c.wait() else 0) return cp # Tracking of stepper positions during a homing/probing move