1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-06 16:07:22 +01:00

Fixed PLW1514 (unspecified-encoding): open in text mode without explicit encoding argument

This commit is contained in:
Teal Dulcet
2023-12-23 05:07:25 -08:00
committed by Joshua Tauberer
parent a02b59d4e4
commit 0e9193651d
12 changed files with 44 additions and 44 deletions

View File

@@ -212,7 +212,7 @@ def run_migrations():
migration_id_file = os.path.join(env['STORAGE_ROOT'], 'mailinabox.version')
migration_id = None
if os.path.exists(migration_id_file):
with open(migration_id_file) as f:
with open(migration_id_file, encoding='utf-8') as f:
migration_id = f.read().strip()
if migration_id is None:
@@ -253,7 +253,7 @@ def run_migrations():
# Write out our current version now. Do this sooner rather than later
# in case of any problems.
with open(migration_id_file, "w") as f:
with open(migration_id_file, "w", encoding='utf-8') as f:
f.write(str(ourver) + "\n")
# Delete the legacy location of this field.