summaryrefslogtreecommitdiffstats
path: root/module/ConfigParser.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-09-27 21:56:42 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-09-27 21:56:42 +0200
commit2ad278fa6daf640038b637dcf4b793ba71317f11 (patch)
tree65b2f92459dd56692c4f6591d6fe1db5e05a5a5e /module/ConfigParser.py
parentutf8 rs auth encoding (diff)
downloadpyload-2ad278fa6daf640038b637dcf4b793ba71317f11.tar.xz
little fixes
Diffstat (limited to 'module/ConfigParser.py')
-rw-r--r--module/ConfigParser.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/module/ConfigParser.py b/module/ConfigParser.py
index 714e34ca9..81be6c021 100644
--- a/module/ConfigParser.py
+++ b/module/ConfigParser.py
@@ -123,13 +123,14 @@ class ConfigParser:
listmode = False
for line in config:
-
- line = line.rpartition("#") # removes comments
-
- if line[1]:
- line = line[0]
- else:
- line = line[2]
+
+ comment = line.rfind("#")
+ if line.find(":", comment) < 0 and line.find("=", comment) < 0:
+ line = line.rpartition("#") # removes comments
+ if line[1]:
+ line = line[0]
+ else:
+ line = line[2]
line = line.strip()