Salome HOME
Apply patch for gdd
[modules/kernel.git] / bin / launchConfigureParser.py
index f5331d5d578c46f96f53b08295982d2a201f9e07..e32982a549365536fb2735b183a5c5ddd6ebf012 100755 (executable)
@@ -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