From: Cédric Aguerre Date: Wed, 29 Jul 2015 07:36:56 +0000 (+0200) Subject: Remove ports from PortManager config file if unused X-Git-Tag: V7_7_0a1~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f01bf5798224e83b120ac5e3b251514e8cf6bea3;p=modules%2Fkernel.git Remove ports from PortManager config file if unused --- diff --git a/bin/killSalomeWithPort.py b/bin/killSalomeWithPort.py index c340e4863..d973eae00 100755 --- a/bin/killSalomeWithPort.py +++ b/bin/killSalomeWithPort.py @@ -374,6 +374,16 @@ def killMyPort(port): import PortManager # do not remove! Test for PortManager availability! filedict = getPiDict(port) if not os.path.isfile(filedict): # removed by previous call, see (1) + if verbose(): + print "SALOME on port %s: already removed by previous call"%port + # Remove port from PortManager config file + try: + from PortManager import releasePort + if verbose(): + print "Removing port from PortManager configuration file" + releasePort(port) + except ImportError: + pass return except: pass