From ae9a9e019a73cb951d4d2a2585ac71a53f351c81 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 3 May 2017 06:21:37 +0200 Subject: spack: no stacktrace if not in debug mode + fix emacs variant (#4098) * spack: no stacktrace if not in debug mode + fix emacs variant * emacs: removed dead code --- lib/spack/spack/variant.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3-60-g2f50