From: XhmikosR Date: Wed, 27 May 2020 13:40:55 +0000 (+0300) Subject: Always use LF in README files X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=d232ef9a0c63296a3318913ad23502bb5529a431;p=stevenblack-hosts.git Always use LF in README files --- diff --git a/updateReadme.py b/updateReadme.py index 633fb0446..b4b0be192 100644 --- a/updateReadme.py +++ b/updateReadme.py @@ -26,7 +26,7 @@ def main(): "${fmtentries} | " "[link](http://sbc.io/hosts/${location}hosts)" ) - with open(README_DATA_FILENAME, "r", encoding="utf-8") as f: + with open(README_DATA_FILENAME, "r", encoding="utf-8", newline="\n") as f: data = json.load(f) keys = list(data.keys()) @@ -80,9 +80,9 @@ def main(): source_rows += t.substitute(this_row) + "\n" 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", newline="\n" ) as out: - for line in open(README_TEMPLATE, encoding="utf-8"): + for line in open(README_TEMPLATE, encoding="utf-8", newline="\n"): line = line.replace( "@GEN_DATE@", time.strftime("%B %d %Y", time.gmtime()) )