From 1994c4c0e1bde8a7d00a66957e966a790aee6d4e Mon Sep 17 00:00:00 2001 From: Thijs Triemstra Date: Tue, 31 Oct 2023 14:30:03 +0100 Subject: [PATCH] Fix shadowed mcu variable in loop. It clashes with the mcu module import as reported by flake8: klippy/klippy.py:150:23: F402 import 'mcu' from line 9 shadowed by loop variable Signed-off-by: Thijs Triemstra --- klippy/klippy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/klippy/klippy.py b/klippy/klippy.py index 097cff998c22..6ac4abebd07d 100644 --- a/klippy/klippy.py +++ b/klippy/klippy.py @@ -147,9 +147,9 @@ def _build_protocol_error_message(self, e): host_version = self.start_args['software_version'] msg_update = [] msg_updated = [] - for mcu_name, mcu in self.lookup_objects('mcu'): + for mcu_name, mcu_obj in self.lookup_objects('mcu'): try: - mcu_version = mcu.get_status()['mcu_version'] + mcu_version = mcu_obj.get_status()['mcu_version'] except: logging.exception("Unable to retrieve mcu_version from mcu") continue