From b8e68e7577aa12e0e355aabe2845981f0d73e3b5 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Thu, 25 Dec 2008 23:57:07 -0500 Subject: 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. --- mailman/queue/archive.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'mailman/queue') 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) -- cgit v1.3.1