From cf5bc84872d4e865bdf96198b40fda47f7f285a2 Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Fri, 9 Oct 2020 11:58:19 +0300 Subject: refactoring --- kvmd/plugins/msd/otg/helpers.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'kvmd/plugins/msd/otg') diff --git a/kvmd/plugins/msd/otg/helpers.py b/kvmd/plugins/msd/otg/helpers.py index df004c6d..a3c60e02 100644 --- a/kvmd/plugins/msd/otg/helpers.py +++ b/kvmd/plugins/msd/otg/helpers.py @@ -59,13 +59,6 @@ async def unlock_drive(base_cmd: List[str]) -> None: async def _run_helper(cmd: List[str]) -> None: logger = get_logger(0) logger.info("Executing helper %s ...", cmd) - - (proc, stdout) = await aioproc.read_process(cmd) - - if stdout: - log = (logger.info if proc.returncode == 0 else logger.error) - for line in stdout.split("\n"): - log("Console: %s", line) - + proc = await aioproc.log_process(cmd, logger) if proc.returncode != 0: raise MsdError(f"Error while helper execution: pid={proc.pid}; retcode={proc.returncode}") -- cgit v1.2.3