]> git.99rst.org Git - stevenblack-hosts.git/commitdiff
Close the README template file after reading it
authorXhmikosR <redacted>
Sun, 5 Jul 2026 14:53:50 +0000 (17:53 +0300)
committerXhmikosR <redacted>
Sun, 5 Jul 2026 14:53:50 +0000 (17:53 +0300)
updateReadme.py

index 779257f91ef962dcb66234f6f60f1e0ed2a7e26d..0421a4a67200b510f02343f34326bc3a7a005f25 100755 (executable)
@@ -90,8 +90,10 @@ def main():
             "wt",
             encoding="utf-8",
             newline="\n",
-        ) as out:
-            for line in open(README_TEMPLATE, encoding="utf-8", newline="\n"):
+        ) as out, open(
+            README_TEMPLATE, encoding="utf-8", newline="\n"
+        ) as template:
+            for line in template:
                 line = line.replace(
                     "@GEN_DATE@", time.strftime("%B %d %Y", time.gmtime())
                 )
git clone https://git.99rst.org/PROJECT