From 5a75749406622d05703f25ac76c2b9287995d43f Mon Sep 17 00:00:00 2001 From: rnv Date: Thu, 13 Feb 2014 13:45:34 +0400 Subject: [PATCH] Fix for the issue " 0022489: [CEA 1055] Regression: option shutdown-servers=1 does not work anymore" --- bin/runSalome.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bin/runSalome.py b/bin/runSalome.py index 87539c111..49abc7db7 100755 --- a/bin/runSalome.py +++ b/bin/runSalome.py @@ -749,7 +749,7 @@ def useSalome(args, modules_list, modules_root_dir): import killSalomeWithPort self.killSalomeWithPort = killSalomeWithPort return - def __del__(self): + def delete(self): self.killSalomeWithPort.killMyPort(self.port) return pass @@ -811,6 +811,11 @@ def no_main(): from searchFreePort import searchFreePort searchFreePort(args, 0) clt = useSalome(args, modules_list, modules_root_dir) + + if args.has_key('shutdown_servers') : + var = args['shutdown_servers'] + if hasattr(var, 'delete') and callable(getattr(var, 'delete')) : + var.delete() return clt # ----------------------------------------------------------------------------- @@ -939,6 +944,10 @@ def runSalome(): foreGround(clt, args) pass # -- + if args.has_key('shutdown_servers') : + var = args['shutdown_servers'] + if hasattr(var, 'delete') and callable(getattr(var, 'delete')) : + var.delete() pass # -- 2.39.2