diff options
-rw-r--r-- | lib/spack/llnl/util/tty/log.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/spack/llnl/util/tty/log.py b/lib/spack/llnl/util/tty/log.py index efcd487f23..a7a4637ba9 100644 --- a/lib/spack/llnl/util/tty/log.py +++ b/lib/spack/llnl/util/tty/log.py @@ -780,7 +780,12 @@ def _writer_daemon(stdin_multiprocess_fd, read_multiprocess_fd, write_fd, echo, try: while line_count < 100: # Handle output from the calling process. - line = _retry(in_pipe.readline)() + try: + line = _retry(in_pipe.readline)() + except UnicodeDecodeError: + # installs like --test=root gpgme produce non-UTF8 logs + line = '<line lost: output was not encoded as UTF-8>\n' + if not line: return line_count += 1 |