Salome HOME
Issue #1896: Do not send message about errors in initConfig script
[modules/shaper.git] / src / Config / Config_ModuleReader.cpp
index ddb2742407438828378759086cc03fde739aff55..9e8549cdb43bd7d7aea303add9f452ed95bf922c 100644 (file)
@@ -172,7 +172,7 @@ void Config_ModuleReader::loadPlugin(const std::string& thePluginName)
   }
 }
 
-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();
@@ -195,7 +195,8 @@ void Config_ModuleReader::loadScript(const std::string& theFileName)
       Py_XDECREF(pvalue);
       Py_XDECREF(ptraceback);
     }
-    Events_InfoMessage("Config_ModuleReader", anErrorMsg).send();
+    if (theSendErr)
+      Events_InfoMessage("Config_ModuleReader", anErrorMsg).send();
   }
 
   /* release python thread */