summaryrefslogtreecommitdiff
path: root/src/mailman/app/digests.py
diff options
context:
space:
mode:
authorBarry Warsaw2015-12-22 15:38:42 -0500
committerBarry Warsaw2015-12-22 15:38:42 -0500
commit8d74a4f3b19928a9c311096aa5b39893ae3fe701 (patch)
treea2bf6426693b7647f987969805b0f94645ba0177 /src/mailman/app/digests.py
parentc9464cb64f434749fee21e5ebbb15ce3f2fc1691 (diff)
downloadmailman-8d74a4f3b19928a9c311096aa5b39893ae3fe701.tar.gz
mailman-8d74a4f3b19928a9c311096aa5b39893ae3fe701.tar.zst
mailman-8d74a4f3b19928a9c311096aa5b39893ae3fe701.zip
Diffstat (limited to 'src/mailman/app/digests.py')
-rw-r--r--src/mailman/app/digests.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mailman/app/digests.py b/src/mailman/app/digests.py
index b66a4c54c..2190fdf98 100644
--- a/src/mailman/app/digests.py
+++ b/src/mailman/app/digests.py
@@ -28,9 +28,7 @@ import os
from mailman.config import config
from mailman.email.message import Message
from mailman.interfaces.digests import DigestFrequency
-from mailman.interfaces.listmanager import IListManager
from mailman.utilities.datetime import now as right_now
-from zope.component import getUtility
@@ -95,7 +93,10 @@ def maybe_send_digest_now(mlist, force=False):
# us exactly how big the resulting MIME and rfc1153 digest will
# 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)
+ try:
+ size = os.path.getsize(mailbox_path)
+ except FileNotFoundError:
+ size = 0
if (size >= mlist.digest_size_threshold * 1024.0 or
(force and size > 0)):
# Send the digest. Because we don't want to hold up this process