summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2019-02-07 19:19:19 +0100
committerPeter Scheibel <scheibel1@llnl.gov>2019-02-07 12:19:19 -0600
commit58f1dc037afca48bbffed7589e87d34f52288857 (patch)
tree4c0871b607ab593a51e462c8b4c85280f7f61c5e /lib
parentb8684b318c8b39ceff958ffc778da07fdaaa07a8 (diff)
downloadspack-58f1dc037afca48bbffed7589e87d34f52288857.tar.gz
spack-58f1dc037afca48bbffed7589e87d34f52288857.tar.bz2
spack-58f1dc037afca48bbffed7589e87d34f52288857.tar.xz
spack-58f1dc037afca48bbffed7589e87d34f52288857.zip
log-parse: fix error message when no error lines are found (#10543)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/util/log_parse.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/spack/spack/util/log_parse.py b/lib/spack/spack/util/log_parse.py
index ae5992a992..467f9eb45f 100644
--- a/lib/spack/spack/util/log_parse.py
+++ b/lib/spack/spack/util/log_parse.py
@@ -76,7 +76,7 @@ def make_log_context(log_events, width=None):
error_lines = set(e.line_no for e in log_events)
log_events = sorted(log_events, key=lambda e: e.line_no)
- num_width = len(str(max(error_lines))) + 4
+ num_width = len(str(max(error_lines or [0]))) + 4
line_fmt = '%%-%dd%%s' % num_width
indent = ' ' * (5 + num_width)