Python: Be more descriptive when modules can't be loaded.

main
Adriaan de Groot 8 years ago
parent 57031a4c15
commit 10eaf06f60

@ -82,12 +82,14 @@ Module::fromDescriptor( const QVariantMap& moduleDescriptor,
{ {
m = new ViewModule(); m = new ViewModule();
} }
#ifdef WITH_PYTHONQT
else if ( intfString == "pythonqt" ) else if ( intfString == "pythonqt" )
{ {
#ifdef WITH_PYTHONQT
m = new PythonQtViewModule(); m = new PythonQtViewModule();
} #else
cLog() << "PythonQt modules are not supported in this version of Calamares.";
#endif #endif
}
} }
else if ( typeString == "job" ) else if ( typeString == "job" )
{ {
@ -99,17 +101,20 @@ Module::fromDescriptor( const QVariantMap& moduleDescriptor,
{ {
m = new ProcessJobModule(); m = new ProcessJobModule();
} }
#ifdef WITH_PYTHON
else if ( intfString == "python" ) else if ( intfString == "python" )
{ {
#ifdef WITH_PYTHON
m = new PythonJobModule(); m = new PythonJobModule();
} #else
cLog() << "Python modules are not supported in this version of Calamares.";
#endif #endif
}
} }
if ( !m ) if ( !m )
{ {
cLog() << Q_FUNC_INFO << "bad module type or interface string" cLog() << "Bad module type (" << typeString
<< instanceId << typeString << intfString; << ") or interface string (" << intfString
<< ") for module " << instanceId;
return nullptr; return nullptr;
} }

Loading…
Cancel
Save