summaryrefslogtreecommitdiff
path: root/src/mailman/handlers
diff options
context:
space:
mode:
authorBarry Warsaw2015-12-20 14:10:05 -0500
committerBarry Warsaw2015-12-20 14:10:05 -0500
commitf58d9ea918e5970026fb09785f06e53abf43b6dd (patch)
tree10b986e365a524328fcefea26490e3078e28ceb2 /src/mailman/handlers
parent573e60947a0a688afccf81bd9230fed9c6bbb650 (diff)
downloadmailman-f58d9ea918e5970026fb09785f06e53abf43b6dd.tar.gz
mailman-f58d9ea918e5970026fb09785f06e53abf43b6dd.tar.zst
mailman-f58d9ea918e5970026fb09785f06e53abf43b6dd.zip
Diffstat (limited to 'src/mailman/handlers')
-rw-r--r--src/mailman/handlers/to_digest.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mailman/handlers/to_digest.py b/src/mailman/handlers/to_digest.py
index d9c707e12..1b1ed84f1 100644
--- a/src/mailman/handlers/to_digest.py
+++ b/src/mailman/handlers/to_digest.py
@@ -130,22 +130,23 @@ def maybe_send_digest_now(mlist=None, force=False):
# actually be, but it's the most easily available metric to decide
# whether the size threshold has been reached.
size = os.path.getsize(mailbox_path)
- if (size >= mlist.digest_size_threshold * 1024.0 or
+ if (size >= mailing_list.digest_size_threshold * 1024.0 or
(force and size > 0)):
# Send the digest. Because we don't want to hold up this process
# with crafting the digest, we're going to move the digest file to
# a safe place, then craft a fake message for the DigestRunner as
# a trigger for it to build and send the digest.
mailbox_dest = os.path.join(
- mlist.data_path,
- 'digest.{0.volume}.{0.next_digest_number}.mmdf'.format(mlist))
- volume = mlist.volume
- digest_number = mlist.next_digest_number
- bump_digest_number_and_volume(mlist)
+ mailing_list.data_path,
+ 'digest.{0.volume}.{0.next_digest_number}.mmdf'.format(
+ mailing_list))
+ volume = mailing_list.volume
+ digest_number = mailing_list.next_digest_number
+ bump_digest_number_and_volume(mailing_list)
os.rename(mailbox_path, mailbox_dest)
config.switchboards['digest'].enqueue(
Message(),
- listid=mlist.list_id,
+ listid=mailing_list.list_id,
digest_path=mailbox_dest,
volume=volume,
digest_number=digest_number)