mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-04-15 23:47:24 +02:00
Fixed PLW1514 (unspecified-encoding): open in text mode without explicit encoding argument
This commit is contained in:
committed by
Joshua Tauberer
parent
a02b59d4e4
commit
0e9193651d
@@ -76,7 +76,7 @@ for setting in settings:
|
||||
|
||||
found = set()
|
||||
buf = ""
|
||||
with open(filename) as f:
|
||||
with open(filename, encoding="utf-8") as f:
|
||||
input_lines = list(f)
|
||||
|
||||
while len(input_lines) > 0:
|
||||
@@ -144,7 +144,7 @@ for i in range(len(settings)):
|
||||
|
||||
if not testing:
|
||||
# Write out the new file.
|
||||
with open(filename, "w") as f:
|
||||
with open(filename, "w", encoding="utf-8") as f:
|
||||
f.write(buf)
|
||||
else:
|
||||
# Just print the new file to stdout.
|
||||
|
||||
Reference in New Issue
Block a user