diff options
| author | Barry Warsaw | 2014-04-14 12:14:13 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2014-04-14 12:14:13 -0400 |
| commit | 403cbf23c07839b60c85c0bc791b6437f05c8a85 (patch) | |
| tree | b36d0ecab20e01f23bcf66ab2b27633aaf3e99c3 /src/mailman/runners/archive.py | |
| parent | ff6df86000da8fcb055101c5cede36b27cb0480a (diff) | |
| parent | 3a9725b91ef822122a70170333d71b58e1788a78 (diff) | |
| download | mailman-403cbf23c07839b60c85c0bc791b6437f05c8a85.tar.gz mailman-403cbf23c07839b60c85c0bc791b6437f05c8a85.tar.zst mailman-403cbf23c07839b60c85c0bc791b6437f05c8a85.zip | |
Diffstat (limited to 'src/mailman/runners/archive.py')
| -rw-r--r-- | src/mailman/runners/archive.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mailman/runners/archive.py b/src/mailman/runners/archive.py index f18bd7c61..b49f5c265 100644 --- a/src/mailman/runners/archive.py +++ b/src/mailman/runners/archive.py @@ -1,4 +1,4 @@ -# Copyright (C) 2000-2013 by the Free Software Foundation, Inc. +# Copyright (C) 2000-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # @@ -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) |
