Skip to content

Commit

Permalink
Rollup merge of #42089 - nagisa:xpy-broke-on-py3-again⁈, r=alexcrichton
Browse files Browse the repository at this point in the history
Fix x.py

Fixes #42085
  • Loading branch information
Mark-Simulacrum committed May 18, 2017
2 parents 5688e4c + c5163aa commit 01a6a9f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 01a6a9f

Please sign in to comment.