summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-09-28 13:16:01 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-09-28 13:16:01 +0200
commit5248e0d4543ccefe6606f81cc2a26db837d9df8e (patch)
tree28167afaf76ad0e659ebd1726b9fb8e02c676c6d /module
parentrs wait time fix (diff)
downloadpyload-5248e0d4543ccefe6606f81cc2a26db837d9df8e.tar.xz
parser fix
Diffstat (limited to 'module')
-rw-r--r--module/ConfigParser.py8
1 files changed, 4 insertions, 4 deletions
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("["):