From d9051e80d3f65c96ab402927bd27ee434b98ee98 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 2 Apr 2021 12:29:41 -0400 Subject: [PATCH] Fix console buffer interaction In some environments, the read method on the pipe object fails to work, os.read should be the same, but seems to work better and is happy to perform the opportunisticly large reads I want. --- confluent_server/confluent/consoleserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/confluent_server/confluent/consoleserver.py b/confluent_server/confluent/consoleserver.py index ad01585c..d9bc23e7 100644 --- a/confluent_server/confluent/consoleserver.py +++ b/confluent_server/confluent/consoleserver.py @@ -74,7 +74,7 @@ def get_buffer_output(nodename): select.select((instream,), (), (), 30) while not outdata or outdata[-1]: try: - chunk = instream.read(128) + chunk = os.read(instream.fileno(), 128) except IOError: chunk = None if chunk: