Skip to content

Commit

Permalink
Fix shadowed mcu variable in loop.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
thijstriemstra committed Oct 31, 2023
1 parent f7567a0 commit 1994c4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions klippy/klippy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1994c4c

Please sign in to comment.