summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreugeneswalker <38933153+eugeneswalker@users.noreply.github.com>2020-07-22 16:15:25 -0700
committerGregory Becker <becker33@llnl.gov>2020-07-23 13:56:45 -0700
commitc6241e72a6d01b43cd256ff18bc46d9ae8df76cb (patch)
treec0f60f510cbb10c7ce203c3af528fe63f102ed17
parentf528022a7d4a3671deed9b031e878cf7a0ba950f (diff)
downloadspack-c6241e72a6d01b43cd256ff18bc46d9ae8df76cb.tar.gz
spack-c6241e72a6d01b43cd256ff18bc46d9ae8df76cb.tar.bz2
spack-c6241e72a6d01b43cd256ff18bc46d9ae8df76cb.tar.xz
spack-c6241e72a6d01b43cd256ff18bc46d9ae8df76cb.zip
bugfix: use getattr for variation.prefix/suffix (#17669)
-rw-r--r--lib/spack/spack/compilers/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py
index 0f0fb94c1e..36291a8f63 100644
--- a/lib/spack/spack/compilers/__init__.py
+++ b/lib/spack/spack/compilers/__init__.py
@@ -681,8 +681,8 @@ def make_compiler_list(detected_versions):
sort_fn = lambda variation: (
'cc' not in by_compiler_id[variation], # None last
'cxx' not in by_compiler_id[variation], # None last
- variation.prefix,
- variation.suffix,
+ getattr(variation, 'prefix', None),
+ getattr(variation, 'suffix', None),
)
compilers = []