From 87b87199f28542be20e49549f48462aed4b73e51 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 22 Oct 2014 01:03:12 -0700 Subject: Fix for SPACK-43: compiler finding fails gracefully on unknown error. --- lib/spack/spack/compiler.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib') diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 90fbf08241..35e3b898ec 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -190,6 +190,12 @@ class Compiler(object): except ProcessError, e: tty.debug("Couldn't get version for compiler %s" % full_path, e) return None + except Exception, e: + # Catching "Exception" here is fine because it just + # means something went wrong running a candidate executable. + tty.debug("Error while executing candidate compiler %s" % full_path, + "%s: %s" %(e.__class__.__name__, e)) + return None successful = [key for key in parmap(check, checks) if key is not None] return dict(((v, p, s), path) for v, p, s, path in successful) -- cgit v1.2.3-70-g09d2