X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=bin%2FparseConfigFile.py;h=bf2dbb9e08bbf724dc0b0db2b50f3f040a4fcdb0;hb=9ed27bb6b3a18d7554fa762bcbfc74d6018843a4;hp=8085055610ba597526bd8b324b7c253918cb659a;hpb=08f917e721f569bc071a0e8ccc9ba4e8262c1eb2;p=modules%2Fkernel.git diff --git a/bin/parseConfigFile.py b/bin/parseConfigFile.py index 808505561..bf2dbb9e0 100644 --- a/bin/parseConfigFile.py +++ b/bin/parseConfigFile.py @@ -250,6 +250,15 @@ class EnvFileConverter(object): value = self._purgeValue(value, k) line = ADD_TO_PREFIX + k + ": " + value # Update list of variable names + if "cleandup()" in line: + print "WARNING: parseConfigFile.py: skip cleandup and look for '# PRODUCT environment'" + while True: + line = self.fp.readline() + if "# PRODUCT environment" in line: + print "WARNING: parseConfigFile.py: '# PRODUCT environment' found" + break + while "clean " in line[0:6]: #skip clean calls with ending ";" crash + line = self.fp.readline() if "=" in line: variable, value = line.split('=') self.allParsedVariableNames.append(variable) @@ -296,7 +305,8 @@ class EnvFileConverter(object): # Convert .sh environment file to configuration file format def convertEnvFileToConfigFile(envFilename, configFilename): #reserved=['PATH', 'LD_LIBRARY_PATH', 'PYTHONPATH'] - reserved=['PATH', 'LD_LIBRARY_PATH', 'PYTHONPATH', 'MANPATH', 'R_LIBS', 'PV_PLUGIN_PATH'] + print "convert envFilename",envFilename,"to",configFilename + reserved=['PATH', 'LD_LIBRARY_PATH', 'PYTHONPATH', 'MANPATH', 'R_LIBS', 'PV_PLUGIN_PATH', 'TCLLIBPATH', 'TKLIBPATH'] fileContents = open(envFilename, 'r').read() pattern = re.compile('\n[\n]+', re.VERBOSE) # multiple '\n'