From f122464b264fb99fc7a7098bfdfeeb6fdef644f0 Mon Sep 17 00:00:00 2001 From: cvw Date: Wed, 28 Aug 2013 07:40:32 +0000 Subject: [PATCH] avoid error for complicated sh line xx=`...=...` --- bin/parseConfigFile.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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} -- 2.39.2