]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
[EDF26936] : helper for test purpose
authorAnthony Geay <anthony.geay@edf.fr>
Mon, 13 Feb 2023 08:40:43 +0000 (09:40 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Mon, 13 Feb 2023 08:40:43 +0000 (09:40 +0100)
src/KERNEL_PY/__init__.py

index 8c05dbac6e1065e16d3dd9ddbceab1ebcf281c09..c3bd7fbec5ecb860d76ae1a1284d2092dc55e2e2 100644 (file)
@@ -411,9 +411,12 @@ def salome_shutdown_containers_with_session():
         ref_in_ns = "/".join(root+[cont_name])
         naming_service.Destroy_Name(ref_in_ns)
     print("Number of containers in NS after clean : {}".format( len( list(salome_walk_on_containers(ns,[""])) )))
+
+def retrieve_containers_in_ns():
+    return [elt for elt in naming_service.repr() if "/Containers/" == elt[:12]]
     
 def salome_shutdown_containers_without_session():
-    containersEntries = [elt for elt in naming_service.repr() if "/Containers/" == elt[:12]]
+    containersEntries = retrieve_containers_in_ns()
     for containerEntry in containersEntries:
         cont = naming_service.Resolve(containerEntry)
         try: