aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/FileGenerator.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/FileGenerator.py')
-rw-r--r--scripts/FileGenerator.py6
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)