diff options
author | Maxim Devaev <[email protected]> | 2022-08-17 04:08:59 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-08-17 04:08:59 +0300 |
commit | 5757eba8548ee3d53115bd9273884c77837b8a33 (patch) | |
tree | d4556066184801fdd96ebc89e39a3b17b7bba158 | |
parent | e0513ced475e1dd9b59c2fc747075d1255909bf6 (diff) |
minor fix
-rw-r--r-- | kvmd/plugins/ugpio/cmd.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/kvmd/plugins/ugpio/cmd.py b/kvmd/plugins/ugpio/cmd.py index 665a4334..537a68d1 100644 --- a/kvmd/plugins/ugpio/cmd.py +++ b/kvmd/plugins/ugpio/cmd.py @@ -73,18 +73,16 @@ class Plugin(BaseUserGpioDriver): # pylint: disable=too-many-instance-attribute _ = pin try: proc = await aioproc.log_process(self.__cmd, logger=get_logger(0), prefix=str(self)) - return proc.returncode == 0 + return (proc.returncode == 0) except Exception as err: get_logger(0).error("Can't run custom command [ %s ]: %s", tools.cmdfmt(self.__cmd), tools.efmt(err)) raise GpioDriverOfflineError(self) - return False async def write(self, pin: str, state: bool) -> None: _ = pin if not state: return - try: proc = await aioproc.log_process(self.__cmd, logger=get_logger(0), prefix=str(self)) if proc.returncode != 0: |