removed unnecessary proc.returncode

This commit is contained in:
Maxim Devaev
2022-04-12 12:45:27 +03:00
parent 047d8ad760
commit 04e0ad213a
3 changed files with 5 additions and 5 deletions

View File

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