diff --git a/src/libcalamares/PythonHelper.cpp b/src/libcalamares/PythonHelper.cpp index 27100bada..11e199e0c 100644 --- a/src/libcalamares/PythonHelper.cpp +++ b/src/libcalamares/PythonHelper.cpp @@ -288,8 +288,18 @@ Helper::handleLastError() bp::str outputString( a ); bp::extract< std::string > extractedOutput( outputString ); + QString output; if ( extractedOutput.check() ) - valMsg.append( QString::fromStdString( extractedOutput() ) ); + { + output = QString::fromStdString( extractedOutput() ).trimmed(); + } + if ( !output.isEmpty() ) + { + // Replace the Type of the error by the warning string, + // and use the output of the command (e.g. its stderr) as value. + typeMsg = valMsg; + valMsg = output; + } } debug << valMsg << '\n'; } @@ -323,7 +333,7 @@ Helper::handleLastError() if ( !tbMsg.isEmpty() ) { - msgList.append( "Traceback:" ); + msgList.append( QStringLiteral( "
Traceback:" ) ); msgList.append( QString( "
%1
" ).arg( tbMsg.toHtmlEscaped() ) ); }