From 5561bbb3bcfa8ea11d10084a8b529caa31d9b83b Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Wed, 15 Jan 2020 08:50:16 -0800 Subject: [PATCH] executils: Drop bufsize=1 from execReadlines startProgram is running in binary mode, so bufsize=1 is invalid. The ExecLineReader class already breaks it up into lines using readline() so there is no need to change the default buffering. --- src/pylorax/executils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pylorax/executils.py b/src/pylorax/executils.py index c5ea222e..da5df60c 100644 --- a/src/pylorax/executils.py +++ b/src/pylorax/executils.py @@ -327,7 +327,7 @@ def execReadlines(command, argv, stdin=None, root='/', env_prune=None, filter_st stderr = subprocess.STDOUT try: - proc = startProgram(argv, root=root, stdin=stdin, stdout=subprocess.PIPE, stderr=stderr, bufsize=1, + proc = startProgram(argv, root=root, stdin=stdin, stdout=subprocess.PIPE, stderr=stderr, env_prune=env_prune, env_add=env_add, reset_handlers=reset_handlers, reset_lang=reset_lang) except OSError as e: with program_log_lock: