From f1eec05d0e39ed0235b1094fd27f82d85e325da8 Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Wed, 22 Jul 2020 16:15:25 -0700 Subject: [PATCH] bugfix: use getattr for variation.prefix/suffix (#17669) --- lib/spack/spack/compilers/__init__.py | 4 ++-- 1 file 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 _default_make_compilers(cmp_id, paths): 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 = []