[libcalamaresui] Only load config file if there is one

- finally, no more warnings for modules that are NO_CONFIG
   (or noconfig: true) and don't have a config file.
This commit is contained in:
Adriaan de Groot 2020-01-24 21:47:54 +01:00
parent f366e3840f
commit 83ffbd5126

View File

@ -155,14 +155,17 @@ Module::fromDescriptor( const Calamares::ModuleSystem::Descriptor& moduleDescrip
}
m->initFrom( moduleDescriptor );
try
if ( !configFileName.isEmpty() )
{
m->loadConfigurationFile( configFileName );
}
catch ( YAML::Exception& e )
{
cError() << "YAML parser error " << e.what();
return nullptr;
try
{
m->loadConfigurationFile( configFileName );
}
catch ( YAML::Exception& e )
{
cError() << "YAML parser error " << e.what();
return nullptr;
}
}
return m.release();
}