mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-03 00:07:05 +00:00
Fixed PLW1514 (unspecified-encoding): open
in text mode without explicit encoding
argument
This commit is contained in:
parent
ca452e918e
commit
430ee05b8a
4
management/mailconfig.py
Executable file → Normal file
4
management/mailconfig.py
Executable file → Normal file
@ -148,8 +148,8 @@ def get_mail_users_ex(env, with_archived=False):
|
||||
box_quota = 0
|
||||
percent = ''
|
||||
try:
|
||||
dirsize_file = os.path.join(env['STORAGE_ROOT'], 'mail/mailboxes/%s/%s/maildirsize' % (domain, user))
|
||||
with open(dirsize_file, 'r') as f:
|
||||
dirsize_file = os.path.join(env['STORAGE_ROOT'], f'mail/mailboxes/{domain}/{user}/maildirsize')
|
||||
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(' ')
|
||||
|
Loading…
Reference in New Issue
Block a user