]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
avoid error for complicated sh line xx=`...=...`
authorcvw <cvw>
Wed, 28 Aug 2013 07:40:32 +0000 (07:40 +0000)
committercvw <cvw>
Wed, 28 Aug 2013 07:40:32 +0000 (07:40 +0000)
bin/parseConfigFile.py

index 76c014c8f70bcabf4e2851d45a64d38f240e7551..991dadd036f68ef54dfa6fa3c394b59d4a9ca473 100644 (file)
@@ -260,7 +260,11 @@ class EnvFileConverter(object):
       while "clean " in line[0:6]: #skip clean calls with ending ";" crash
         line = self.fp.readline()
       if "=" in line:
-        variable, value = line.split('=')
+        try:
+          variable, value = line.split('=')
+        except: #avoid error for complicated sh line xx=`...=...`, but warning
+          print "WARNING: EnvFileConverter: line with multiples '=' character are hazardous: '"+line+"'"
+          variable, value = line.split('=',1)          
         self.allParsedVariableNames.append(variable)
       # Self-extending variables that are not in reserved keywords
       # Example: FOO=something:${FOO}