Salome HOME
updated copyright message
[modules/shaper.git] / src / PythonAPI / initConfig.py
index f0e95b3d603b2440239353152b4261e29c1c18d5..2b97ca72675149e2d7e649a20c626245d1e88c08 100644 (file)
@@ -1,3 +1,22 @@
+# Copyright (C) 2014-2023  CEA, EDF
+#
+# 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
 """
@@ -8,8 +27,6 @@ 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()
+aCorbaModules = salome.modulcat.GetComponentList()
 for aName in aCorbaModules:
   ConfigAPI.Config_ModuleReader.addDependencyModule(aName)