From 7628223d4831a14ef6e62f734a9ef2186f9bf994 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Thu, 28 Mar 2024 14:28:49 +0100 Subject: [PATCH] [EDF29852] : Ready to log replay sessions --- src/KERNEL_PY/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/KERNEL_PY/__init__.py b/src/KERNEL_PY/__init__.py index 615332500..6d7d73211 100644 --- a/src/KERNEL_PY/__init__.py +++ b/src/KERNEL_PY/__init__.py @@ -430,11 +430,13 @@ def salome_shutdown_containers_with_session(): def retrieve_containers_in_ns(): return [elt for elt in naming_service.repr() if "/Containers/" == elt[:12]] + +def get_all_containers(): + containersEntries = retrieve_containers_in_ns() + return [naming_service.Resolve(containerEntry) for containerEntry in containersEntries] def salome_shutdown_containers_without_session(): - containersEntries = retrieve_containers_in_ns() - for containerEntry in containersEntries: - cont = naming_service.Resolve(containerEntry) + for cont in get_all_containers(): try: cont.Shutdown() except: -- 2.39.2