This commit is contained in:
Onur Küçük
2006-08-30 13:48:55 +00:00
parent 5cc4262b52
commit dc86f5be27
+5 -3
View File
@@ -167,10 +167,12 @@ def readConfig():
if home != "" and os.path.exists(cfg): if home != "" and os.path.exists(cfg):
for line in file(cfg): for line in file(cfg):
if line != "" and not line.startswith("#") and "=" in line: if line != "" and not line.startswith("#") and "=" in line:
k, v = line.split("=", 1) l, m = line.split("=", 1)
if k.strip() in ["name", "email"]: k = l.strip()
v = m.strip()
if k in ["name", "email"]:
if v.startswith('"') or v.startswith("'"): if v.startswith('"') or v.startswith("'"):
v = v.strip()[1:-1] v = v[1:-1]
d[k.strip()] = v.strip() d[k.strip()] = v.strip()
return d["name"], d["email"] return d["name"], d["email"]