From: Kefu Chai Date: Wed, 27 Apr 2022 01:46:48 +0000 (+0800) Subject: teuthology/repo_util: pass universal_newlines=True X-Git-Tag: 1.2.0~173^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=73ff1421a20b26b863242c422e68d8ff0c8fa045;p=teuthology.git teuthology/repo_util: pass universal_newlines=True for better readability Signed-off-by: Kefu Chai --- 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)