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

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

This commit is contained in:
Teal Dulcet
2025-06-18 04:28:09 -07:00
parent 66f140a8cf
commit 498e92dc95
2 changed files with 3 additions and 3 deletions

View File

@@ -148,7 +148,7 @@ def get_mail_users_ex(env, with_archived=False):
percent = ''
try:
dirsize_file = os.path.join(env['STORAGE_ROOT'], 'mail/mailboxes/{}/{}/maildirsize'.format(domain, user))
with open(dirsize_file, 'r') as f:
with open(dirsize_file, 'r', encoding="utf-8") as f:
box_quota = int(f.readline().split('S')[0])
for line in f.readlines():
(size, count) = line.split(' ')