Python: trim description to the first line of run.__doc__
This commit is contained in:
parent
9860922496
commit
cb36c54755
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user