summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
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)