summaryrefslogtreecommitdiff
path: root/lib/spack/spack/spec.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/spack/spack/spec.py')
-rw-r--r--lib/spack/spack/spec.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index f7a78863d4..71971453f2 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -1661,7 +1661,13 @@ class Spec(object):
d['patches'] = variant._patches_in_order_of_appearance
if hash.package_hash:
- d['package_hash'] = self.package.content_hash()
+ package_hash = self.package.content_hash()
+
+ # Full hashes are in bytes
+ if (not isinstance(package_hash, six.text_type)
+ and isinstance(package_hash, six.binary_type)):
+ package_hash = package_hash.decode('utf-8')
+ d['package_hash'] = package_hash
deps = self.dependencies_dict(deptype=hash.deptype)
if deps: