From c5163aadc5e599d45e9022a3d8df4815b6066bdc Mon Sep 17 00:00:00 2001 From: Simonas Kazlauskas Date: Thu, 18 May 2017 21:22:15 +0300 Subject: [PATCH] Fix x.py --- src/bootstrap/bootstrap.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index e15304a7e6e67..bfba1a0dede24 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -398,13 +398,14 @@ def run(self, args, env=None, cwd=None): sys.exit(ret) def output(self, args, env=None, cwd=None): + default_encoding = sys.getdefaultencoding() proc = subprocess.Popen(args, stdout=subprocess.PIPE, env=env, cwd=cwd) (out, err) = proc.communicate() ret = proc.wait() if ret != 0: print(out) sys.exit(ret) - return out + return out.decode(default_encoding) def build_triple(self): default_encoding = sys.getdefaultencoding() @@ -570,10 +571,10 @@ def update_submodules(self): for submod in submodules: path, status = submod - if path.endswith(b"llvm") and \ + if path.endswith('llvm') and \ (self.get_toml('llvm-config') or self.get_mk('CFG_LLVM_ROOT')): continue - if path.endswith(b"jemalloc") and \ + if path.endswith('jemalloc') and \ (self.get_toml('jemalloc') or self.get_mk('CFG_JEMALLOC_ROOT')): continue submod_path = os.path.join(self.rust_root, path)