From 5248e0d4543ccefe6606f81cc2a26db837d9df8e Mon Sep 17 00:00:00 2001 From: RaNaN Date: Tue, 28 Sep 2010 13:16:01 +0200 Subject: parser fix --- module/ConfigParser.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/ConfigParser.py') diff --git a/module/ConfigParser.py b/module/ConfigParser.py index 32d3caca7..9186c875c 100644 --- a/module/ConfigParser.py +++ b/module/ConfigParser.py @@ -125,14 +125,14 @@ class ConfigParser: for line in config: comment = line.rfind("#") - if line.find(":", comment) < 0 and line.find("=", comment) < 0: + if line.find(":", comment) < 0 and line.find("=", comment) < 0 and comment > 0: line = line.rpartition("#") # removes comments if line[1]: line = line[0] else: line = line[2] - line = line.strip() + line = line.strip() try: @@ -165,8 +165,8 @@ class ConfigParser: desc = desc.replace('"', "").strip() - typ, none, option = content.rpartition(" ") - + typ, none, option = content.strip().rpartition(" ") + value = value.strip() if value.startswith("["): -- cgit v1.2.3