From 0d521d56eca345e4d7279d86a072ef1693639b1b Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Wed, 27 Jan 2021 15:27:17 -0800 Subject: [PATCH] openmpi find external fixup (#21354) --- var/spack/repos/builtin/packages/openmpi/package.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index fb5d70f34f..4984a28926 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -446,10 +446,11 @@ def determine_variants(cls, exes, version): # Get the appropriate compiler match = re.search(r'\bC compiler absolute: (\S+)', output) - compiler_spec = get_spack_compiler_spec( - os.path.dirname(match.group(1))) - if compiler_spec: - variants += "%" + str(compiler_spec) + if match: + compiler_spec = get_spack_compiler_spec( + os.path.dirname(match.group(1))) + if compiler_spec: + variants += "%" + str(compiler_spec) results.append(variants) return results