Commit e0ed45c1 by sikang

bug fix

parent 049d728b
...@@ -24,6 +24,6 @@ resp = requests.get(ksp_url) ...@@ -24,6 +24,6 @@ resp = requests.get(ksp_url)
content = resp.text content = resp.text
encode = chardet.detect(resp.content)['encoding'] encode = chardet.detect(resp.content)['encoding']
if "<Code>NoSuchKey</Code>" not in content: if "<Code>NoSuchKey</Code>" not in content:
with io.open(path+"privacyKsp.html", "w+", encode) as fout: with io.open(path+"privacyKsp.html", "w+", encoding=encode) as fout:
fout.write(content) fout.write(content)
print("本地KSP协议已更新!" + ksp_url) print("本地KSP协议已更新!" + ksp_url)
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