2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-03-03 12:29:18 +00:00

Properly address runansible error relay

This commit is contained in:
Jarrod Johnson
2024-03-06 09:27:53 -05:00
parent 3d33e33ea2
commit 496e7b4ef3

View File

@@ -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]