separate stdout/stderr from lbcctl on tests

This commit is contained in:
Victor Shyba 2021-12-07 21:22:08 -03:00 committed by Jack Robison
parent cffe895d22
commit bad8ae7832
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -588,9 +588,11 @@ class LBCWalletNode:
loop = asyncio.get_event_loop() loop = asyncio.get_event_loop()
asyncio.get_child_watcher().attach_loop(loop) asyncio.get_child_watcher().attach_loop(loop)
process = await asyncio.create_subprocess_exec( process = await asyncio.create_subprocess_exec(
*cmnd_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT *cmnd_args, stdout=subprocess.PIPE, stderr=subprocess.PIPE
) )
out, _ = await process.communicate() out, err = await process.communicate()
if err:
log.warning(err)
result = out.decode().strip() result = out.decode().strip()
self.log.info(result) self.log.info(result)
if result.startswith('error code'): if result.startswith('error code'):