diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 8f3c454223b..1650d2ac136 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -1222,7 +1222,7 @@ def _setup_pkg_and_run( # objects can't be sent to the parent. exc_type = type(e) tb = e.__traceback__ - tb_string = traceback.format_exception(exc_type, e, tb) + tb_string = "".join(traceback.format_exception(exc_type, e, tb)) # build up some context from the offending package so we can # show that, too.