From bf9bf8b37dbc3c2c1a33a300ce09d5d573b78d23 Mon Sep 17 00:00:00 2001 From: Matthias Veit Date: Thu, 29 Feb 2024 11:28:14 +0100 Subject: [PATCH] [core][fix] Wait after stdout/stderr has been read (#1963) --- fixcore/fixcore/cli/command.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fixcore/fixcore/cli/command.py b/fixcore/fixcore/cli/command.py index 12d3f42aac..13c8e8a0ec 100644 --- a/fixcore/fixcore/cli/command.py +++ b/fixcore/fixcore/cli/command.py @@ -3678,9 +3678,9 @@ async def create_backup(self, arg: Optional[str]) -> AsyncIterator[JsonElement]: # fmt: on stdout_b, stderr_b = await process.communicate() maybe_proc = process - code = await process.wait() stdout = stdout_b.decode() if stdout_b else "" stderr = stderr_b.decode() if stderr_b else "" + code = await process.wait() if code == 0: log.debug(f"arangodump: out={stdout}, err={stderr}.") @@ -3738,9 +3738,9 @@ async def restore_backup(self, backup_file: Optional[str], ctx: CLIContext) -> A # fmt: on stdout_b, stderr_b = await process.communicate() maybe_proc = process - code = await process.wait() stdout = stdout_b.decode() if stdout_b else "" stderr = stderr_b.decode() if stderr_b else "" + code = await process.wait() if code == 0: log.debug(f"arangorestore: out={stdout}, err={stderr}.")