mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
improved subprocess cmd logging
This commit is contained in:
@@ -83,7 +83,8 @@ class Plugin(BaseUserGpioDriver): # pylint: disable=too-many-instance-attribute
|
||||
if proc.returncode != 0:
|
||||
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))
|
||||
get_logger(0).error("Can't run custom command [ %s ]: %s",
|
||||
tools.cmdfmt(self.__cmd), tools.efmt(err))
|
||||
raise GpioDriverOfflineError(self)
|
||||
|
||||
def __str__(self) -> str:
|
||||
|
||||
Reference in New Issue
Block a user