summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2018-08-14 16:06:08 -0500
committerTodd Gamblin <tgamblin@llnl.gov>2018-08-21 14:16:50 -0700
commitf97550e149ccfd4293fb511254216a8fa532f396 (patch)
treecfe15395e499f7667da953b211422355d8768e09 /lib
parentdb508a8f8972aee456713d7e676363915752e23a (diff)
downloadspack-f97550e149ccfd4293fb511254216a8fa532f396.tar.gz
spack-f97550e149ccfd4293fb511254216a8fa532f396.tar.bz2
spack-f97550e149ccfd4293fb511254216a8fa532f396.tar.xz
spack-f97550e149ccfd4293fb511254216a8fa532f396.zip
Fix error caused by missing spack-build.out build log
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/build_environment.py4
-rw-r--r--lib/spack/spack/error.py2
2 files changed, 3 insertions, 3 deletions
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.
"""