From 6dd012fcbc6de5583267ee93b5aecdb2725d0529 Mon Sep 17 00:00:00 2001 From: Ofer Koren Date: Sun, 22 Jan 2023 18:56:28 +0200 Subject: [PATCH] bug fix on missing stdout/err attributes on ProcessExecutionError object --- plumbum/commands/processes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plumbum/commands/processes.py b/plumbum/commands/processes.py index a34d74c82..3ecc13e97 100644 --- a/plumbum/commands/processes.py +++ b/plumbum/commands/processes.py @@ -127,6 +127,8 @@ def __init__(self, argv, retcode, stdout, stderr, message=None, host=None): if isinstance(stdout, list): assert isinstance(stderr, list) self.all_output += self._format_lines(heapq.merge(stdout, stderr)) + self.stdout = "\n".join(line for *_, line in stdout) + self.stderr = "\n".join(line for *_, line in stderr) else: if isinstance(stdout, bytes): stdout = ascii(stdout)