diff options
author | Maxim Devaev <[email protected]> | 2024-09-18 04:37:43 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2024-09-18 04:37:43 +0300 |
commit | 7a53f1445619fc471c2823e7081de8b6039b938e (patch) | |
tree | 961dd0072cc976504fe4570743d801c79512e9a6 /kvmd/plugins/ugpio/pwm.py | |
parent | 45270a09d7b5076bac96887a1e36d752882e3adf (diff) |
refactoring
Diffstat (limited to 'kvmd/plugins/ugpio/pwm.py')
-rw-r--r-- | kvmd/plugins/ugpio/pwm.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kvmd/plugins/ugpio/pwm.py b/kvmd/plugins/ugpio/pwm.py index 8aedb771..f202836e 100644 --- a/kvmd/plugins/ugpio/pwm.py +++ b/kvmd/plugins/ugpio/pwm.py @@ -94,18 +94,18 @@ class Plugin(BaseUserGpioDriver): pwm.period_ns = self.__period pwm.duty_cycle_ns = self.__get_duty_cycle(bool(initial)) pwm.enable() - except Exception as err: + except Exception as ex: logger.error("Can't get PWM chip %d channel %d: %s", - self.__chip, pin, tools.efmt(err)) + self.__chip, pin, tools.efmt(ex)) async def cleanup(self) -> None: for (pin, pwm) in self.__pwms.items(): try: pwm.disable() pwm.close() - except Exception as err: + except Exception as ex: get_logger(0).error("Can't cleanup PWM chip %d channel %d: %s", - self.__chip, pin, tools.efmt(err)) + self.__chip, pin, tools.efmt(ex)) async def read(self, pin: str) -> bool: try: |