summaryrefslogtreecommitdiff
path: root/mailman/queue/archive.py
diff options
context:
space:
mode:
authorBarry Warsaw2008-12-25 23:57:07 -0500
committerBarry Warsaw2008-12-25 23:57:07 -0500
commitb8e68e7577aa12e0e355aabe2845981f0d73e3b5 (patch)
tree4d988c8de9e29b080ac258d0bc1e4eee8e5ee32b /mailman/queue/archive.py
parentd4de7996e6d4fb5db04dfed3b3fd12747622b164 (diff)
downloadmailman-b8e68e7577aa12e0e355aabe2845981f0d73e3b5.tar.gz
mailman-b8e68e7577aa12e0e355aabe2845981f0d73e3b5.tar.zst
mailman-b8e68e7577aa12e0e355aabe2845981f0d73e3b5.zip
Added a buildout hack for zope.testing so that we can add our own command line
options to bin/test. More test repair, even though it's cheating. Use a bunch of variables from Defaults.py even though these will have to be moved to the schema.cfg. Update logging initialization to consult the propagate flag from the command line. Also skip mailman.root since this is not a valid logger.
Diffstat (limited to 'mailman/queue/archive.py')
-rw-r--r--mailman/queue/archive.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/mailman/queue/archive.py b/mailman/queue/archive.py
index e9fd5f7ad..7725f6f97 100644
--- a/mailman/queue/archive.py
+++ b/mailman/queue/archive.py
@@ -25,6 +25,7 @@ __all__ = [
import os
import time
+import logging
from datetime import datetime
from email.Utils import parsedate_tz, mktime_tz, formatdate
@@ -34,6 +35,8 @@ from mailman import Defaults
from mailman.core.plugins import get_plugins
from mailman.queue import Runner
+log = logging.getLogger('mailman.error')
+
class ArchiveRunner(Runner):
@@ -78,5 +81,10 @@ class ArchiveRunner(Runner):
# While a list archiving lock is acquired, archive the message.
with Lock(os.path.join(mlist.data_path, 'archive.lck')):
for archive_factory in get_plugins('mailman.archiver'):
- archive_factory().archive_message(mlist, msg)
-
+ # A problem in one archiver should not prevent any other
+ # archiver from running.
+ try:
+ archive = archive_factory()
+ archive.archive_message(mlist, msg)
+ except Exception:
+ log.exception('Broken archiver: %s' % archive.name)