Fix error caused by missing spack-build.out build log

This commit is contained in:
Adam J. Stewart 2018-08-14 16:06:08 -05:00 committed by Todd Gamblin
parent db508a8f89
commit f97550e149
2 changed files with 3 additions and 3 deletions

View file

@ -908,7 +908,7 @@ def long_message(self):
if (self.module, self.name) in ChildError.build_errors:
# The error happened in some external executed process. Show
# the build log with errors highlighted.
if self.build_log:
if self.build_log and os.path.exists(self.build_log):
errors, warnings = parse_log_events(self.build_log)
nerr = len(errors)
if nerr > 0:
@ -929,7 +929,7 @@ def long_message(self):
if out.getvalue():
out.write('\n')
if self.build_log:
if self.build_log and os.path.exists(self.build_log):
out.write('See build log for details:\n')
out.write(' %s' % self.build_log)

View file

@ -63,7 +63,7 @@ def print_context(self):
"""Print extended debug information about this exception.
This is usually printed when the top-level Spack error handler
calls ``die()``, but it acn be called separately beforehand if a
calls ``die()``, but it can be called separately beforehand if a
lower-level error handler needs to print error context and
continue without raising the exception to the top level.
"""