refactoring

This commit is contained in:
Maxim Devaev
2024-09-18 04:37:43 +03:00
parent 45270a09d7
commit 7a53f14456
83 changed files with 517 additions and 516 deletions

View File

@@ -78,9 +78,9 @@ class Plugin(BaseUserGpioDriver): # pylint: disable=too-many-instance-attribute
proc = await aioproc.log_process(self.__cmd, logger=get_logger(0), prefix=str(self))
if proc.returncode != 0:
raise RuntimeError(f"Custom command error: retcode={proc.returncode}")
except Exception as err:
except Exception as ex:
get_logger(0).error("Can't run custom command [ %s ]: %s",
tools.cmdfmt(self.__cmd), tools.efmt(err))
tools.cmdfmt(self.__cmd), tools.efmt(ex))
raise GpioDriverOfflineError(self)
def __str__(self) -> str: