aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormpheath <unknown>2021-08-31 08:31:09 +1000
committermpheath <unknown>2021-08-31 08:31:09 +1000
commit55fe9d28c0b81690f605f05e4cce6cc8873d920e (patch)
tree820b8864d4d92f61c06bf67ba747f905158f8d28
parent17113ca41a020a6c37d3bd859201bf716b3c6b7a (diff)
downloadscintilla-mirror-55fe9d28c0b81690f605f05e4cce6cc8873d920e.tar.gz
Bug [#2279] Ensure file closed. Drop deprecated "U" as that is the default.
-rw-r--r--scripts/Face.py2
-rw-r--r--scripts/FileGenerator.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/scripts/Face.py b/scripts/Face.py
index 1559dfccd..21fc67995 100644
--- a/scripts/Face.py
+++ b/scripts/Face.py
@@ -144,4 +144,4 @@ class Face:
name, value = featureVal.split("=", 1)
self.aliases[name] = value
currentComment = []
-
+ file.close()
diff --git a/scripts/FileGenerator.py b/scripts/FileGenerator.py
index aaa0a8ac9..e7b0f236d 100644
--- a/scripts/FileGenerator.py
+++ b/scripts/FileGenerator.py
@@ -175,7 +175,7 @@ def UpdateLineInFile(path, linePrefix, lineReplace):
def ReadFileAsList(path):
"""Read all the lnes in the file and return as a list of strings without line ends.
"""
- with codecs.open(path, "rU", "utf-8") as f:
+ with codecs.open(path, "r", "utf-8") as f:
return [l.rstrip('\n') for l in f]
def UpdateFileFromLines(path, lines, lineEndToUse):