From 99edaae523623d2c84c4127521d2042d8a878132 Mon Sep 17 00:00:00 2001
From: Paul King <devnull@localhost>
Date: Fri, 13 May 2011 21:38:50 +0100
Subject: comment must be preceded by whitespace

---
 module/ConfigParser.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'module')

diff --git a/module/ConfigParser.py b/module/ConfigParser.py
index 3304ec258..81336e119 100644
--- a/module/ConfigParser.py
+++ b/module/ConfigParser.py
@@ -125,11 +125,11 @@ class ConfigParser:
         for line in config:
 
             comment = line.rfind("#")
-            if line.find(":", comment) < 0 and line.find("=", comment) < 0 and comment > 0:
+            if line.find(":", comment) < 0 and line.find("=", comment) < 0 and comment > 0 and line[comment-1].isspace():
                 line = line.rpartition("#") # removes comments            
                 if line[1]:
                     line = line[0]
-                else:
+                else: rpartition
                     line = line[2]
             
             line = line.strip()
-- 
cgit v1.2.3