diff --git a/octoprint_psucontrol/__init__.py b/octoprint_psucontrol/__init__.py index c9553eb..ef8a03f 100644 --- a/octoprint_psucontrol/__init__.py +++ b/octoprint_psucontrol/__init__.py @@ -144,8 +144,8 @@ def get_gpio_devs(self): def cleanup_gpio(self): - for pin in self._configuredGPIOPins.values(): - self._logger.debug("Cleaning up pin {}".format(pin)) + for k, pin in self._configuredGPIOPins.items(): + self._logger.debug("Cleaning up {} pin {}".format(k, pin.name)) try: pin.close() except Exception as e: