Skip to content

Commit d0c83aa

Browse files
author
Eric Arellano
committed
Fix issues with backend native
1 parent 9a1b3b7 commit d0c83aa

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/python/pants/backend/native/targets/native_artifact.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ def as_shared_lib(self, platform):
2929

3030
def _compute_fingerprint(self):
3131
# FIXME: can we just use the __hash__ method here somehow?
32-
return sha1(self.lib_name).hexdigest() if PY3 else sha1(self.lib_name).hexdigest().decode('utf-8')
32+
hasher = sha1(self.lib_name.encode('utf-8'))
33+
return hasher.hexdigest() if PY3 else hasher.hexdigest().decode('utf-8')

tests/python/pants_test/backend/native/subsystems/test_native_toolchain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def _invoke_capturing_output(self, cmd, env=None):
134134
env = os.environ.copy()
135135
try:
136136
with environment_as(**env):
137-
return subprocess.check_output(cmd, stderr=subprocess.STDOUT)
137+
return subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode('utf-8')
138138
except subprocess.CalledProcessError as e:
139139
raise Exception(
140140
"Command failed while invoking the native toolchain "

0 commit comments

Comments
 (0)