From 69afca435b271b42a341730802467bacf88fa444 Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 19 Mar 2026 12:00:33 +1100 Subject: Remove unnecessary readlines and make FindCredits same as SciTE. --- scripts/FileGenerator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/FileGenerator.py') diff --git a/scripts/FileGenerator.py b/scripts/FileGenerator.py index f798e1d6b..f596e9cbe 100644 --- a/scripts/FileGenerator.py +++ b/scripts/FileGenerator.py @@ -4,7 +4,7 @@ # Generate or regenerate source files based on comments in those files. # May be modified in-place or a template may be generated into a complete file. -# Requires Python 2.7 or later +# Requires Python 3.6 or later # The files are copied to a string apart from sections between a # ++Autogenerated comment and a --Autogenerated comment which is # generated by the CopyWithInsertion function. After the whole string is @@ -143,7 +143,7 @@ def UpdateLineInPlistFile(path, key, value): lines = [] keyCurrent = "" with codecs.open(path, "rb", "utf-8") as f: - for line in f.readlines(): + for line in f: ls = line.strip() if ls.startswith(""): keyCurrent = ls.replace("", "").replace("", "") @@ -160,7 +160,7 @@ def UpdateLineInFile(path, linePrefix, lineReplace): lines = [] updated = False with codecs.open(path, "r", "utf-8") as f: - for line in f.readlines(): + for line in f: line = line.rstrip() if not updated and line.startswith(linePrefix): lines.append(lineReplace) -- cgit v1.2.3