From 4d1c81fccdc2de03514fdf58478a43095ea972e6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Aguerre?= Date: Fri, 11 Apr 2014 13:29:58 +0200 Subject: [PATCH] trim quoted paths --- bin/parseConfigFile.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/parseConfigFile.py b/bin/parseConfigFile.py index d8722a6cf..7590fbaf3 100644 --- a/bin/parseConfigFile.py +++ b/bin/parseConfigFile.py @@ -103,6 +103,12 @@ class MultiOptSafeConfigParser(ConfigParser.SafeConfigParser): if pos != -1 and optval[pos-1].isspace(): optval = optval[:pos] optval = optval.strip() + # ADD THESE LINES + splittedComments = optval.split('#') + optval = splittedComments[0].strip().strip("'").strip('"') + #if len(splittedComments) > 1: + # optval += " #" + " ".join(splittedComments[1:]) + # END OF ADD # allow empty values if optval == '""': optval = '' -- 2.39.2