diff options
| author | Barry Warsaw | 2013-11-27 15:13:10 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2013-11-27 15:13:10 -0500 |
| commit | 0ce1d7a1da2e93270acc49d4527417fa6c20a911 (patch) | |
| tree | bbfa43d9f71690096ed218ca5862550a726f5994 /src/mailman/runners/archive.py | |
| parent | adde8bfb3f90f2d2204500bce75550fee8369bcb (diff) | |
| parent | b3ce2a4f6106fa4b2d014ab921f9b6a25b067de3 (diff) | |
| download | mailman-0ce1d7a1da2e93270acc49d4527417fa6c20a911.tar.gz mailman-0ce1d7a1da2e93270acc49d4527417fa6c20a911.tar.zst mailman-0ce1d7a1da2e93270acc49d4527417fa6c20a911.zip | |
Diffstat (limited to 'src/mailman/runners/archive.py')
| -rw-r--r-- | src/mailman/runners/archive.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mailman/runners/archive.py b/src/mailman/runners/archive.py index f18bd7c61..907ba5707 100644 --- a/src/mailman/runners/archive.py +++ b/src/mailman/runners/archive.py @@ -36,6 +36,7 @@ from mailman.config import config from mailman.core.runner import Runner from mailman.interfaces.archiver import ClobberDate from mailman.utilities.datetime import RFC822_DATE_FMT, now +from mailman.interfaces.mailinglist import IListArchiverSet log = logging.getLogger('mailman.error') @@ -90,7 +91,12 @@ class ArchiveRunner(Runner): def _dispose(self, mlist, msg, msgdata): received_time = msgdata.get('received_time', now(strip_tzinfo=False)) - for archiver in config.archivers: + archiver_set = IListArchiverSet(mlist) + for archiver in archiver_set.archivers: + # The archiver is disabled if either the list-specific or + # site-wide archiver is disabled. + if not archiver.is_enabled: + continue msg_copy = copy.deepcopy(msg) if _should_clobber(msg, msgdata, archiver.name): original_date = msg_copy['date'] @@ -102,6 +108,6 @@ class ArchiveRunner(Runner): # A problem in one archiver should not prevent other archivers # from running. try: - archiver.archive_message(mlist, msg_copy) + archiver.system_archiver.archive_message(mlist, msg_copy) except Exception: log.exception('Broken archiver: %s' % archiver.name) |
