feed emails: display list names and message counts in verbose mode

This commit is contained in:
Frédéric Péters 2019-11-01 14:06:36 +01:00
parent 6055f35517
commit 0449a457b2
1 changed files with 6 additions and 0 deletions

View File

@ -18,7 +18,10 @@ class Command(BaseCommand):
for maildir in options.get('maildir'):
if 'commits' in maildir:
continue
if options['verbosity'] >= 2:
print(maildir)
box = mailbox.Maildir(maildir, create=False)
count = 0
for message_id in box.iterkeys():
message = box[message_id]
try:
@ -37,3 +40,6 @@ class Command(BaseCommand):
'list_id': list_id,
'author_email': author_email,
'author_datetime': author_date})
count += 1
if options['verbosity'] >= 2:
print(' ->', count)