Salome HOME
Fix for the issue #2753 : error when dump/load script
[modules/shaper.git] / src / PythonAPI / initConfig.py
index 6e130ee0c586ed8b79848d2da3406139e28b8d28..e056939a2901568ff51e80a14ff6f11b7d9cbef7 100644 (file)
@@ -1,3 +1,23 @@
+## Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+##
+## This library is free software; you can redistribute it and/or
+## modify it under the terms of the GNU Lesser General Public
+## License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+##
+## This library is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public
+## License along with this library; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+## See http:##www.salome-platform.org/ or
+## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+##
+
 """This script inspects existing modules in SALOME and registrs them in
 Module reader
 """
@@ -6,6 +26,8 @@ import salome
 import SALOME_ModuleCatalog
 import ConfigAPI
 
+# needed on immediate start of SHAPER from SALOME: salome.naming_service is not initialized then
+salome.salome_init()
 obj = salome.naming_service.Resolve('Kernel/ModulCatalog')
 catalog = obj._narrow(SALOME_ModuleCatalog.ModuleCatalog)
 aCorbaModules = catalog.GetComponentList()