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:
committed by
Joshua Tauberer
parent
a02b59d4e4
commit
0e9193651d
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user