summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/variant.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/spack/spack/variant.py b/lib/spack/spack/variant.py
index 7102676b69..2d02ab1253 100644
--- a/lib/spack/spack/variant.py
+++ b/lib/spack/spack/variant.py
@@ -389,9 +389,9 @@ class BoolValuedVariant(SingleValuedVariant):
self._original_value = value
self._value = False
else:
- msg = 'cannot construct a BoolValuedVariant from '
+ msg = 'cannot construct a BoolValuedVariant for "{0}" from '
msg += 'a value that does not represent a bool'
- raise ValueError(msg)
+ raise ValueError(msg.format(self.name))
def __contains__(self, item):
return item is self.value