From 5ae3f4c62aa8b9df37f4cff335d089a1a3717363 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 6 Mar 2024 09:27:53 -0500 Subject: [PATCH] Properly address runansible error relay --- confluent_server/confluent/runansible.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/confluent_server/confluent/runansible.py b/confluent_server/confluent/runansible.py index 8e5d1a3d..50696742 100644 --- a/confluent_server/confluent/runansible.py +++ b/confluent_server/confluent/runansible.py @@ -32,6 +32,7 @@ anspypath = None running_status = {} class PlayRunner(object): def __init__(self, playfiles, nodes): + self.stderr = '' self.playfiles = playfiles self.nodes = nodes self.worker = None @@ -96,7 +97,8 @@ class PlayRunner(object): [mypath, __file__, targnodes, playfilename], stdin=devnull, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - stdout, self.stderr = worker.communicate() + stdout, stder = worker.communicate() + self.stderr += stder.decode('utf8') current = memoryview(stdout) while len(current): sz = struct.unpack('=q', current[:8])[0]