Commit 1b46274c authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

+better comment detection in local.conf

parent cad94273
...@@ -80,11 +80,13 @@ def read_local_conf(conf_file,pattern): ...@@ -80,11 +80,13 @@ 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:
if line[0]!="#": line = line.strip()
test = line.find(pattern) if len(line)!=0:
if test!=-1: if line.strip()[0]!="#":
pars = line.split("=")[1].strip().strip("\"").split(":") test = line.find(pattern)
ret.append(pars) if test!=-1:
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):
...@@ -93,10 +95,12 @@ def read_local_conf_dev(conf_file,pattern): ...@@ -93,10 +95,12 @@ 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]!="#": line = line.strip()
test = line.find(pattern) if len(line)!=0:
if test!=-1: if line[0]!="#":
ret = line.split("=")[1].strip().strip("\"") test = line.find(pattern)
if test!=-1:
ret = line.split("=")[1].strip().strip("\"")
return ret return ret
def update_branch(names_from_conf,name_from_list,pars,git_proto): def update_branch(names_from_conf,name_from_list,pars,git_proto):
......
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