mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
minor fix
This commit is contained in:
parent
e0513ced47
commit
5757eba854
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user