From 83ffbd5126b2e8c2c763aa0acf35d41e54127bb7 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 24 Jan 2020 21:47:54 +0100 Subject: [PATCH] [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. --- src/libcalamaresui/modulesystem/Module.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/libcalamaresui/modulesystem/Module.cpp b/src/libcalamaresui/modulesystem/Module.cpp index 227e25a2d..8fe3f2ac6 100644 --- a/src/libcalamaresui/modulesystem/Module.cpp +++ b/src/libcalamaresui/modulesystem/Module.cpp @@ -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(); }