Skip to content

Commit

Permalink
Use communicate
Browse files Browse the repository at this point in the history
  • Loading branch information
sfodagain committed Nov 27, 2024
1 parent 41c6ae2 commit c07fda6
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .builder/actions/tls_server_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ def run(self, env):
def close_tls_server():
print("Terminating openssl TLS server")
p.terminate()
print("=== stdout:")
for c in iter(lambda: p.stdout.read(1), b""):
sys.stdout.buffer.write(c)
print("=== stderr:")
for c in iter(lambda: p.stderr.read(1), b""):
sys.stdout.buffer.write(c)
print("=== now bye")
out, err = p.communicate()
print("=== stdout:\n{}".format(out))
# for c in iter(lambda: p.stdout.read(1), b""):
# sys.stdout.buffer.write(c)
print("=== stderr:\n{}".format(err))
# for c in iter(lambda: p.stderr.read(1), b""):
# sys.stdout.buffer.write(c)
print("====== bye")

0 comments on commit c07fda6

Please sign in to comment.