From 5b879459c7b20ca5d5f18136bb025a4001fdeb7b Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Wed, 9 Oct 2019 20:36:47 -0500 Subject: 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. --- lib/spack/spack/relocate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') 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' -- cgit v1.2.3-70-g09d2