From bcbdc983a8d768aa6514fe2adb2541d1b9085a00 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 30 Sep 2021 13:06:34 -0400 Subject: [PATCH] screws_tilt_adjust: Improve Python3 compatibility Signed-off-by: Kevin O'Connor --- klippy/extras/screws_tilt_adjust.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/klippy/extras/screws_tilt_adjust.py b/klippy/extras/screws_tilt_adjust.py index f98cd0fd..1bb599ed 100644 --- a/klippy/extras/screws_tilt_adjust.py +++ b/klippy/extras/screws_tilt_adjust.py @@ -69,7 +69,7 @@ class ScrewsTiltAdjust: or (not is_clockwise_thread and self.direction == 'CCW')) min_or_max = max if use_max else min i_base, z_base = min_or_max( - enumerate([pos[2] for pos in positions]), key=lambda (i, z): z) + enumerate([pos[2] for pos in positions]), key=lambda v: v[1]) else: # First screw is the base position used for comparison i_base, z_base = 0, positions[0][2]