]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Fix bug NPAL17025 (can't launch Salome 4 if another Salome's session is running)
authorvsr <vsr@opencascade.com>
Tue, 25 Sep 2007 12:04:36 +0000 (12:04 +0000)
committervsr <vsr@opencascade.com>
Tue, 25 Sep 2007 12:04:36 +0000 (12:04 +0000)
bin/runSalome.py

index 6ccc96453f38a59c5e79fe6a7dada9f46dac0b21..62afcfb215295b58bbe338d5a5ccf84f19d6dbeb 100755 (executable)
@@ -730,9 +730,15 @@ def searchFreePort(args, save_config=1):
         status = 1;
        for item in lines:
            m = regObj.search( item )
-           if m and m.group(1) == NSPORT : 
-               status = 0;
-                break;
+           if m:
+               try:
+                   p = int( m.group(1) )
+                   if p == NSPORT: 
+                       status = 0;
+                       break;
+               except:
+                   pass
+           pass
 
         if status == 1:
             print "%s - OK"%(NSPORT)