Browse Source

Improve variable name and avoid the list keyword

pull/342/head
Leonardo Pistone 5 years ago
committed by Leonardo Pistone
parent
commit
29f1d0c8a0
  1. 5
      mail_check_mailbox_size/models/fetchmail.py

5
mail_check_mailbox_size/models/fetchmail.py

@ -36,8 +36,7 @@ class Fetchmail(models.Model):
"Starting to check mailbox size for server %s"
% server.name)
imap_server = server.connect()
# The list of all folders
result, list = imap_server.list()
result, folders = imap_server.list()
if result != "OK":
raise Exception(_("Server responded %s") % result)
result_msg += _(
@ -53,7 +52,7 @@ class Fetchmail(models.Model):
)
number_of_messages_all = 0
size_all = 0
for item in list:
for item in folders:
x = shlex.split(item.decode())
mailbox = x[-1]
# Select the desired folder

Loading…
Cancel
Save