mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-11-11 08:46:00 +01:00
Fixed FURB129 (readlines-in-for): Instead of calling readlines(), iterate over file object directly
This commit is contained in:
1 parent
ee11f3849b
commit
213e449dfe
1 file changed
+1
-1
@@ -150,7 +150,7 @@ def get_mail_users_ex(env, with_archived=False):
|
||||
dirsize_file = os.path.join(env['STORAGE_ROOT'], 'mail/mailboxes/{}/{}/maildirsize'.format(domain, user))
|
||||
with open(dirsize_file, encoding="utf-8") as f:
|
||||
box_quota = int(f.readline().split('S')[0])
|
||||
for line in f.readlines():
|
||||
for line in f:
|
||||
(size, count) = line.split(' ')
|
||||
box_size += int(size)
|
||||
|
||||
|
||||
Reference in new issue
Block a user