summaryrefslogtreecommitdiff
path: root/Build/source/texk
diff options
context:
space:
mode:
authorAndreas Scherer <andreas_tex@freenet.de>2024-06-29 09:46:02 +0000
committerAndreas Scherer <andreas_tex@freenet.de>2024-06-29 09:46:02 +0000
commit44b511e1090f4d9a2ab9537c7737c1181ca9ad46 (patch)
tree243388e4f249c6d41a1fdc0c6b5fc84dbb06a7d3 /Build/source/texk
parentb64212ed4646bce7bc7d1ac7da3950b2621e9142 (diff)
Revert "Get rid of temp 'line' for reading and writing text files."
This reverts commit 9e10d9728a3a121dfeb2c951045fe6c6cf7396e0. git-svn-id: svn://tug.org/texlive/trunk@71652 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rwxr-xr-xBuild/source/texk/web2c/tests/fix-changefile-lines.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/tests/fix-changefile-lines.py b/Build/source/texk/web2c/tests/fix-changefile-lines.py
index feec5cf4130..ca07ced1a91 100755
--- a/Build/source/texk/web2c/tests/fix-changefile-lines.py
+++ b/Build/source/texk/web2c/tests/fix-changefile-lines.py
@@ -36,7 +36,8 @@ def main():
# 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 @@ class WebReader:
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 @@ class ChangeReader:
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)