diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2014-10-22 01:03:12 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2014-10-22 01:08:08 -0700 |
commit | 87b87199f28542be20e49549f48462aed4b73e51 (patch) | |
tree | 38ff382c4f7e244990b85c5215f962c3f7591c8c | |
parent | c08985f7d1e9d8e7c0f05629033c72ef3ffe1a26 (diff) | |
download | spack-87b87199f28542be20e49549f48462aed4b73e51.tar.gz spack-87b87199f28542be20e49549f48462aed4b73e51.tar.bz2 spack-87b87199f28542be20e49549f48462aed4b73e51.tar.xz spack-87b87199f28542be20e49549f48462aed4b73e51.zip |
Fix for SPACK-43: compiler finding fails gracefully on unknown error.
-rw-r--r-- | lib/spack/spack/compiler.py | 6 |
1 files changed, 6 insertions, 0 deletions
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) |