Commit cad94273 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

ignore comments

parent e9a6d5f6
...@@ -80,10 +80,11 @@ def read_local_conf(conf_file,pattern): ...@@ -80,10 +80,11 @@ def read_local_conf(conf_file,pattern):
with open(conf_file,"r") as f: with open(conf_file,"r") as f:
lines = f.readlines() lines = f.readlines()
for line in lines: for line in lines:
test = line.find(pattern) if line[0]!="#":
if test!=-1: test = line.find(pattern)
pars = line.split("=")[1].strip().strip("\"").split(":") if test!=-1:
ret.append(pars) pars = line.split("=")[1].strip().strip("\"").split(":")
ret.append(pars)
return ret return ret
def read_local_conf_dev(conf_file,pattern): def read_local_conf_dev(conf_file,pattern):
...@@ -92,6 +93,7 @@ def read_local_conf_dev(conf_file,pattern): ...@@ -92,6 +93,7 @@ def read_local_conf_dev(conf_file,pattern):
with open(conf_file,"r") as f: with open(conf_file,"r") as f:
lines = f.readlines() lines = f.readlines()
for line in lines: for line in lines:
if line[0]!="#":
test = line.find(pattern) test = line.find(pattern)
if test!=-1: if test!=-1:
ret = line.split("=")[1].strip().strip("\"") ret = line.split("=")[1].strip().strip("\"")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment