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:
# 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