Skip to content
Snippets Groups Projects
Commit 87b87199 authored by Todd Gamblin's avatar Todd Gamblin
Browse files

Fix for SPACK-43: compiler finding fails gracefully on unknown error.

parent c08985f7
Branches
Tags
No related merge requests found
...@@ -190,6 +190,12 @@ def check(key): ...@@ -190,6 +190,12 @@ def check(key):
except ProcessError, e: except ProcessError, e:
tty.debug("Couldn't get version for compiler %s" % full_path, e) tty.debug("Couldn't get version for compiler %s" % full_path, e)
return None 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] 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) return dict(((v, p, s), path) for v, p, s, path in successful)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment