From: cvw Date: Wed, 28 Aug 2013 07:40:32 +0000 (+0000) Subject: avoid error for complicated sh line xx=`...=...` X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f122464b264fb99fc7a7098bfdfeeb6fdef644f0;p=modules%2Fyacs.git avoid error for complicated sh line xx=`...=...` --- diff --git a/bin/parseConfigFile.py b/bin/parseConfigFile.py index 76c014c8f..991dadd03 100644 --- a/bin/parseConfigFile.py +++ b/bin/parseConfigFile.py @@ -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}