Commit 932c24bf by sikang

bug fix script

parent 16979df0
......@@ -30,7 +30,10 @@ with open(path, "w") as f_w:
line = "harvest_port=%s\n"%(gateway['harvester'][0].split(":")[2])
elif "gateway_ip=" in line:
line = "gateway_ip=\"%s\"\n"%(gateway['gateway'][1])
ip = gateway['gateway'][0]
if len(gateway['gateway']) > 1:
ip = gateway['gateway'][1]
line = "gateway_ip=\"%s\"\n"%(ip)
elif "repayment_h5=" in line:
line = "repayment_h5=\"%s\"\n"%(gateway['repay'][0])
......@@ -41,7 +44,7 @@ with open(path, "w") as f_w:
elif "agreement_url=" in line:
line = "agreement_url=\"%s\"\n"%(gateway['privacy'][0])
elif "home=" in line:
elif "home=" in line and "home" in gateway.keys():
line = "home=\"%s\"\n"%(gateway['home'][0])
f_w.write(line)
......
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