From f97550e149ccfd4293fb511254216a8fa532f396 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 14 Aug 2018 16:06:08 -0500 Subject: Fix error caused by missing spack-build.out build log --- lib/spack/spack/build_environment.py | 4 ++-- lib/spack/spack/error.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 7a47da13f7..8cda3fff08 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -908,7 +908,7 @@ class ChildError(InstallError): 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 @@ class ChildError(InstallError): 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) diff --git a/lib/spack/spack/error.py b/lib/spack/spack/error.py index e179cb5876..ac6a81035a 100644 --- a/lib/spack/spack/error.py +++ b/lib/spack/spack/error.py @@ -63,7 +63,7 @@ class SpackError(Exception): """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. """ -- cgit v1.2.3-70-g09d2