Python: trim description to the first line of run.__doc__

This commit is contained in:
Adriaan de Groot 2017-07-05 06:55:35 -04:00 committed by Philip
parent 9860922496
commit cb36c54755

View File

@ -300,7 +300,13 @@ PythonJob::exec()
bp::extract< std::string > entryPoint_doc_attr(entryPoint.attr( "__doc__" ) );
if ( entryPoint_doc_attr.check() )
m_description = QString::fromStdString( entryPoint_doc_attr() );
{
m_description = QString::fromStdString( entryPoint_doc_attr() ).trimmed();
auto i_newline = m_description.indexOf('\n');
if ( i_newline > 0 )
m_description.truncate( i_newline );
cDebug() << "Job" << prettyName() << "->" << m_description;
}
bp::object runResult = entryPoint();