diff options
| author | Neil <nyamatongwe@gmail.com> | 2026-03-19 12:00:33 +1100 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2026-03-19 12:00:33 +1100 |
| commit | 69afca435b271b42a341730802467bacf88fa444 (patch) | |
| tree | f1a7c127ab122429256a57a4d1955ae5ee2e7884 /scripts/FileGenerator.py | |
| parent | 7c601c401a26d203d191b198a52e745f6a67c1fe (diff) | |
| download | scintilla-mirror-69afca435b271b42a341730802467bacf88fa444.tar.gz | |
Remove unnecessary readlines and make FindCredits same as SciTE.
Diffstat (limited to 'scripts/FileGenerator.py')
| -rw-r--r-- | scripts/FileGenerator.py | 6 |
1 files changed, 3 insertions, 3 deletions
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("<key>"): keyCurrent = ls.replace("<key>", "").replace("</key>", "") @@ -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) |
