diff --git a/src/libcalamares/PythonJob.cpp b/src/libcalamares/PythonJob.cpp index 32e019eb0..a7922145a 100644 --- a/src/libcalamares/PythonJob.cpp +++ b/src/libcalamares/PythonJob.cpp @@ -228,6 +228,7 @@ PythonJob::PythonJob( const QString& scriptFile, : Job( parent ) , m_scriptFile( scriptFile ) , m_workingPath( workingPath ) + , m_description() , m_configurationMap( moduleConfiguration ) { } @@ -293,6 +294,10 @@ PythonJob::exec() scriptNamespace ); bp::object entryPoint = scriptNamespace[ "run" ]; + bp::extract< std::string > entryPoint_doc_attr(entryPoint.attr( "__doc__" ) ); + + if ( entryPoint_doc_attr.check() ) + m_description = QString::fromStdString( entryPoint_doc_attr() ); bp::object runResult = entryPoint(); diff --git a/src/libcalamares/PythonJob.h b/src/libcalamares/PythonJob.h index 9bc9ddb0b..d13705ed8 100644 --- a/src/libcalamares/PythonJob.h +++ b/src/libcalamares/PythonJob.h @@ -53,6 +53,7 @@ private: CalamaresPython::Helper* helper(); QString m_scriptFile; QString m_workingPath; + QString m_description; QVariantMap m_configurationMap; };