summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Gartung <gartung@fnal.gov>2019-10-09 20:36:47 -0500
committerGitHub <noreply@github.com>2019-10-09 20:36:47 -0500
commit5b879459c7b20ca5d5f18136bb025a4001fdeb7b (patch)
tree598c0f15aa410555a18e81aa1436113056460463
parent469bef880a402ce8d7b4b3b804c18f32884c6fb4 (diff)
downloadspack-5b879459c7b20ca5d5f18136bb025a4001fdeb7b.tar.gz
spack-5b879459c7b20ca5d5f18136bb025a4001fdeb7b.tar.bz2
spack-5b879459c7b20ca5d5f18136bb025a4001fdeb7b.tar.xz
spack-5b879459c7b20ca5d5f18136bb025a4001fdeb7b.zip
Buildcache: pass string.encode('utf-8') for old_dir and new_dir to replace_prefix_bin. (#13114)
This should fix a Python3 error from concatenating strings and bytes.
-rw-r--r--lib/spack/spack/relocate.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/spack/spack/relocate.py b/lib/spack/spack/relocate.py
index 2c76166e92..3794189d79 100644
--- a/lib/spack/spack/relocate.py
+++ b/lib/spack/spack/relocate.py
@@ -429,7 +429,8 @@ def relocate_macho_binaries(path_names, old_dir, new_dir, allow_root):
modify_object_macholib(path_name, placeholder, new_dir)
modify_object_macholib(path_name, old_dir, new_dir)
if len(new_dir) <= len(old_dir):
- replace_prefix_bin(path_name, old_dir, new_dir)
+ replace_prefix_bin(path_name, old_dir.encode('utf-8'),
+ new_dir.encode('utf-8'))
else:
tty.warn('Cannot do a binary string replacement'
' with padding for %s'