From 73ff1421a20b26b863242c422e68d8ff0c8fa045 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 27 Apr 2022 09:46:48 +0800 Subject: [PATCH] teuthology/repo_util: pass universal_newlines=True for better readability Signed-off-by: Kefu Chai --- teuthology/repo_utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/teuthology/repo_utils.py b/teuthology/repo_utils.py index 703eb9739..707edda3d 100644 --- a/teuthology/repo_utils.py +++ b/teuthology/repo_utils.py @@ -425,12 +425,13 @@ def bootstrap_teuthology(dest_path): cmd = './bootstrap' boot_proc = subprocess.Popen(cmd, shell=True, cwd=dest_path, env=env, stdout=subprocess.PIPE, - stderr=subprocess.STDOUT) + stderr=subprocess.STDOUT, + universal_newlines=True) out, err = boot_proc.communicate() returncode = boot_proc.wait() log.info("Bootstrap exited with status %s", returncode) if returncode != 0: - for line in out.decode().split("\n"): + for line in out.split("\n"): log.warning(line.strip()) venv_path = os.path.join(dest_path, 'virtualenv') log.info("Removing %s", venv_path) -- 2.47.3