]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Use getPortNumber from salome_utils to
authoradam <adam>
Tue, 22 Mar 2011 11:06:51 +0000 (11:06 +0000)
committeradam <adam>
Tue, 22 Mar 2011 11:06:51 +0000 (11:06 +0000)
search the port number ...
The older method is buggy.

bin/launchConfigureParser.py

index 12ffb6e55f72161d99049b70bd0dd701f105c5e0..cabc859a4ab6f76f00b384408fa3c100fbc747d2 100755 (executable)
@@ -892,19 +892,8 @@ def get_env(theAdditionalOptions=[], appname="SalomeApp"):
     args[appname_nam] = appname
 
     # get the port number
-    my_port = 2809
-    try:
-      file = open(os.environ["OMNIORB_CONFIG"], "r")
-      s = file.read()
-      while len(s):
-        l = string.split(s, ":")
-        if string.split(l[0], " ")[0] == "ORBInitRef" or string.split(l[0], " ")[0] == "InitRef" :
-          my_port = int(l[len(l)-1])
-          pass
-        s = file.read()
-        pass
-    except:
-      pass
+    from salome_utils import getPortNumber
+    my_port = getPortNumber()
 
     args[port_nam] = my_port