Salome HOME
Copyright update 2020
[modules/shaper.git] / src / PythonAPI / initConfig.py
index 6e130ee0c586ed8b79848d2da3406139e28b8d28..42a7917747a3487e197ec8d5d2fe7f0eccd2895e 100644 (file)
@@ -1,3 +1,22 @@
+# Copyright (C) 2014-2020  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
+#
+
 """This script inspects existing modules in SALOME and registrs them in
 Module reader
 """
@@ -6,6 +25,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()