}
}
-void Config_ModuleReader::loadScript(const std::string& theFileName)
+void Config_ModuleReader::loadScript(const std::string& theFileName, bool theSendErr)
{
/* acquire python thread */
PyGILState_STATE gstate = PyGILState_Ensure();
Py_XDECREF(pvalue);
Py_XDECREF(ptraceback);
}
- Events_InfoMessage("Config_ModuleReader", anErrorMsg).send();
+ if (theSendErr)
+ Events_InfoMessage("Config_ModuleReader", anErrorMsg).send();
}
/* release python thread */
/// loads the library with specific name, appends "lib*.dll" or "*.so" depending on the platform
CONFIG_EXPORT static void loadLibrary(const std::string& theLibName);
/// loads the python module with specified name
- CONFIG_EXPORT static void loadScript(const std::string& theFileName);
+ /// \param theFileName name of the script
+ /// \param theSendErr send error message in case of faile
+ CONFIG_EXPORT static void loadScript(const std::string& theFileName, bool theSendErr = true);
/*!
* Extends set of modules, used for dependency checking (if there is no
* required module in the set, a plugin will not be loaded)
{
if (myPluginsInfoLoaded) // nothing to do
return;
- Config_ModuleReader::loadScript("salome.shaper.initConfig");
+ Config_ModuleReader::loadScript("salome.shaper.initConfig", false);
// Read plugins information from XML files
Config_ModuleReader aModuleReader(Config_FeatureMessage::MODEL_EVENT());
aModuleReader.readAll();