Skip to content

Commit

Permalink
Fix issues with backend native
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Arellano committed Aug 17, 2018
1 parent 9a1b3b7 commit d0c83aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/python/pants/backend/native/targets/native_artifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ def as_shared_lib(self, platform):

def _compute_fingerprint(self):
# FIXME: can we just use the __hash__ method here somehow?
return sha1(self.lib_name).hexdigest() if PY3 else sha1(self.lib_name).hexdigest().decode('utf-8')
hasher = sha1(self.lib_name.encode('utf-8'))
return hasher.hexdigest() if PY3 else hasher.hexdigest().decode('utf-8')
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def _invoke_capturing_output(self, cmd, env=None):
env = os.environ.copy()
try:
with environment_as(**env):
return subprocess.check_output(cmd, stderr=subprocess.STDOUT)
return subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode('utf-8')
except subprocess.CalledProcessError as e:
raise Exception(
"Command failed while invoking the native toolchain "
Expand Down

0 comments on commit d0c83aa

Please sign in to comment.