summaryrefslogtreecommitdiff
path: root/Build/source/texk
diff options
context:
space:
mode:
authorAndreas Scherer <andreas_tex@freenet.de>2024-06-29 09:37:07 +0000
committerAndreas Scherer <andreas_tex@freenet.de>2024-06-29 09:37:07 +0000
commita98a6f3bc0e4a5201edec1dd52c900404b83a94b (patch)
tree343d06714b715b1ce44b1bfbe543771a571f760d /Build/source/texk
parent6ee003452a575deb822fbdb2f48a1c3e0e94b5a9 (diff)
Get rid of temp 'line' for reading and writing text files.
git-svn-id: svn://tug.org/texlive/trunk@71649 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, 3 insertions, 4 deletions
diff --git a/Build/source/texk/web2c/tests/fix-changefile-lines.py b/Build/source/texk/web2c/tests/fix-changefile-lines.py
index ca07ced1a91..feec5cf4130 100755
--- a/Build/source/texk/web2c/tests/fix-changefile-lines.py
+++ b/Build/source/texk/web2c/tests/fix-changefile-lines.py
@@ -36,8 +36,7 @@ def main():
# Run through the two files in parallel
ch_reader.traverse(web_reader, opt_handler)
- for line in ch_reader.get_lines():
- print(line)
+ print(ch_reader.get_lines())
class WebReader:
@@ -51,7 +50,7 @@ class WebReader:
self.section_cnt = 0
try:
with open(web_file, "r") as file:
- self._web_lines = [line.rstrip() for line in file]
+ self._web_lines = file.readlines()
except OSError:
eprint(f"Could not open {web_file}")
print(USAGE)
@@ -105,7 +104,7 @@ class ChangeReader:
self._match_lines = None
try:
with open(change_file, "r") as file:
- self._lines = [line.rstrip() for line in file]
+ self._lines = file.readlines()
except OSError:
eprint(f"Could not open {change_file}")
print(USAGE)