Merge pull request #1259 from XhmikosR/patch-1

Make sure we treat any readme assets as `utf-8`
This commit is contained in:
Steven Black 2020-05-03 12:46:47 -04:00 committed by GitHub
commit 0d1a3e00e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,7 @@ def main():
"${fmtentries} | "
"[link](http://sbc.io/hosts/${location}hosts)"
)
with open(README_DATA_FILENAME, "r") as f:
with open(README_DATA_FILENAME, "r", encoding="utf-8") as f:
data = json.load(f)
keys = list(data.keys())
@ -82,7 +82,7 @@ def main():
with open(
os.path.join(data[key]["location"], README_FILENAME), "wt", encoding="utf-8"
) as out:
for line in open(README_TEMPLATE):
for line in open(README_TEMPLATE, encoding="utf-8"):
line = line.replace(
"@GEN_DATE@", time.strftime("%B %d %Y", time.gmtime())
)