texlive[71652] Build/source/texk/web2c/tests/fix-changefile-lines.py:

commits+ascherer at tug.org commits+ascherer at tug.org
Sat Jun 29 11:46:02 CEST 2024


Revision: 71652
          https://tug.org/svn/texlive?view=revision&revision=71652
Author:   ascherer
Date:     2024-06-29 11:46:02 +0200 (Sat, 29 Jun 2024)
Log Message:
-----------
Revert "Get rid of temp 'line' for reading and writing text files."

This reverts commit 9e10d9728a3a121dfeb2c951045fe6c6cf7396e0.

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/tests/fix-changefile-lines.py

Modified: trunk/Build/source/texk/web2c/tests/fix-changefile-lines.py
===================================================================
--- trunk/Build/source/texk/web2c/tests/fix-changefile-lines.py	2024-06-29 09:45:11 UTC (rev 71651)
+++ trunk/Build/source/texk/web2c/tests/fix-changefile-lines.py	2024-06-29 09:46:02 UTC (rev 71652)
@@ -36,7 +36,8 @@
     # Run through the two files in parallel
     ch_reader.traverse(web_reader, opt_handler)
 
-    print(ch_reader.get_lines())
+    for line in ch_reader.get_lines():
+        print(line)
 
 
 class WebReader:
@@ -50,7 +51,7 @@
         self.section_cnt = 0
         try:
             with open(web_file, "r") as file:
-                self._web_lines = file.readlines()
+                self._web_lines = [line.rstrip() for line in file]
         except OSError:
             eprint(f"Could not open {web_file}")
             print(USAGE)
@@ -104,7 +105,7 @@
         self._match_lines = None
         try:
             with open(change_file, "r") as file:
-                self._lines = file.readlines()
+                self._lines = [line.rstrip() for line in file]
         except OSError:
             eprint(f"Could not open {change_file}")
             print(USAGE)



More information about the tex-live-commits mailing list.