summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/cmd/__init__.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/spack/spack/cmd/__init__.py b/lib/spack/spack/cmd/__init__.py
index bcc4524b4f..3e83dbb789 100644
--- a/lib/spack/spack/cmd/__init__.py
+++ b/lib/spack/spack/cmd/__init__.py
@@ -219,9 +219,8 @@ def display_specs(specs, **kwargs):
format = " %%-%ds%%s" % width
for abbrv, spec in zip(abbreviated, specs):
- if hashes:
- print(gray_hash(spec, hlen), )
- print(format % (abbrv, spec.prefix))
+ prefix = gray_hash(spec, hlen) if hashes else ''
+ print prefix + (format % (abbrv, spec.prefix))
elif mode == 'deps':
for spec in specs: