Skip to content

Commit

Permalink
more python 3 compatibility fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mjansson committed Feb 13, 2018
1 parent 6c2129f commit 8caf826
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions build/ninja/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@ def initialize_default_archs(self):
if self.target.is_windows():
self.archs = ['x86-64']
elif self.target.is_linux() or self.target.is_bsd():
localarch = subprocess.check_output(['uname', '-m']).strip()
localarch = subprocess.check_output(['uname', '-m']).decode().strip()
if localarch == 'x86_64' or localarch == 'amd64':
self.archs = ['x86-64']
elif localarch == 'i686':
self.archs = ['x86']
else:
self.archs = [str(localarch)]
self.archs = [localarch]
elif self.target.is_macos():
self.archs = ['x86-64']
elif self.target.is_ios():
Expand Down
2 changes: 1 addition & 1 deletion build/ninja/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def generate_version_string(libname):
gitcmd = 'git.exe'
try:
git_version = subprocess.check_output( [ gitcmd, 'describe', '--long' ], stderr = subprocess.STDOUT ).strip()
tokens = git_version.split( '-' )
tokens = git_version.decode().split( '-' )
version_numbers = tokens[0].split( '.' )
except Exception:
pass
Expand Down

0 comments on commit 8caf826

Please sign in to comment.