From: adam Date: Tue, 22 Mar 2011 11:06:51 +0000 (+0000) Subject: Use getPortNumber from salome_utils to X-Git-Tag: Start_BR_19998_21191~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b9ee75db09507c99f61d61869cd633329786caf9;p=modules%2Fkernel.git Use getPortNumber from salome_utils to search the port number ... The older method is buggy. --- diff --git a/bin/launchConfigureParser.py b/bin/launchConfigureParser.py index 12ffb6e55..cabc859a4 100755 --- a/bin/launchConfigureParser.py +++ b/bin/launchConfigureParser.py @@ -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