]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Remove ports from PortManager config file if unused
authorCédric Aguerre <cedric.aguerre@edf.fr>
Wed, 29 Jul 2015 07:36:56 +0000 (09:36 +0200)
committerCédric Aguerre <cedric.aguerre@edf.fr>
Wed, 29 Jul 2015 07:40:57 +0000 (09:40 +0200)
bin/killSalomeWithPort.py

index c340e48634b449dc28a31dd4d3d5f91618fe69dd..d973eae0079ba35deaf3f227d6e397cb2862a884 100755 (executable)
@@ -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