X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=bin%2FlaunchConfigureParser.py;h=e32982a549365536fb2735b183a5c5ddd6ebf012;hb=c08881e6e17a2480fb307ee4c92d784386bdb97d;hp=f5331d5d578c46f96f53b08295982d2a201f9e07;hpb=1315fd971e7333a532456a346fce4c181487aaa3;p=modules%2Fkernel.git diff --git a/bin/launchConfigureParser.py b/bin/launchConfigureParser.py index f5331d5d5..e32982a54 100755 --- a/bin/launchConfigureParser.py +++ b/bin/launchConfigureParser.py @@ -111,8 +111,9 @@ def version(): if root_dir and os.path.exists( version_file ): filename = version_file if filename: - str = open( filename, "r" ).readline() # str = "THIS IS SALOME - SALOMEGUI VERSION: 3.0.0" - match = re.search( r':\s+([a-zA-Z0-9.]+)\s*$', str ) + with open(filename, "r") as f: + v = f.readline() # v = "THIS IS SALOME - SALOMEGUI VERSION: 3.0.0" + match = re.search( r':\s+([a-zA-Z0-9.]+)\s*$', v ) if match : return match.group( 1 ) except: @@ -763,10 +764,10 @@ Python file arguments, if any, must be comma-separated (without blank characters # wake up session help_str = "Wake up a previously closed session. " help_str += "The session object is found in the naming service pointed by the variable OMNIORB_CONFIG. " - help_str += "If this variable is not setted, the last configuration is taken. " + help_str += "If this variable is not set, the last configuration is taken. " pars.add_argument("--wake-up-session", action="store_true", - dest="wake_up_session", + dest="wake_up_session", default=False, help=help_str) # server launch mode