mirror of
https://github.com/StevenBlack/hosts.git
synced 2024-07-07 13:02:27 +02:00
Merge pull request #1259 from XhmikosR/patch-1
Make sure we treat any readme assets as `utf-8`
This commit is contained in:
commit
0d1a3e00e7
@ -26,7 +26,7 @@ def main():
|
|||||||
"${fmtentries} | "
|
"${fmtentries} | "
|
||||||
"[link](http://sbc.io/hosts/${location}hosts)"
|
"[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)
|
data = json.load(f)
|
||||||
|
|
||||||
keys = list(data.keys())
|
keys = list(data.keys())
|
||||||
@ -82,7 +82,7 @@ def main():
|
|||||||
with open(
|
with open(
|
||||||
os.path.join(data[key]["location"], README_FILENAME), "wt", encoding="utf-8"
|
os.path.join(data[key]["location"], README_FILENAME), "wt", encoding="utf-8"
|
||||||
) as out:
|
) as out:
|
||||||
for line in open(README_TEMPLATE):
|
for line in open(README_TEMPLATE, encoding="utf-8"):
|
||||||
line = line.replace(
|
line = line.replace(
|
||||||
"@GEN_DATE@", time.strftime("%B %d %Y", time.gmtime())
|
"@GEN_DATE@", time.strftime("%B %d %Y", time.gmtime())
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user