diff options
| author | Barry Warsaw | 2009-08-26 02:27:37 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2009-08-26 02:27:37 -0400 |
| commit | 9ad8c1e5524bc9479fd356757016ec160f392dd7 (patch) | |
| tree | 2e8f5aab9ed6d9c52f03ae355dbed080602ee5b1 /src/mailman/queue | |
| parent | 0ce2f82735911c738349b1812c86e09355ecee60 (diff) | |
| download | mailman-9ad8c1e5524bc9479fd356757016ec160f392dd7.tar.gz mailman-9ad8c1e5524bc9479fd356757016ec160f392dd7.tar.zst mailman-9ad8c1e5524bc9479fd356757016ec160f392dd7.zip | |
Instead of using an adapter, use a utility to get the mailing list manager.
Diffstat (limited to 'src/mailman/queue')
| -rw-r--r-- | src/mailman/queue/__init__.py | 3 | ||||
| -rw-r--r-- | src/mailman/queue/lmtp.py | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/mailman/queue/__init__.py b/src/mailman/queue/__init__.py index a6ceb6bb2..f3a0b04e9 100644 --- a/src/mailman/queue/__init__.py +++ b/src/mailman/queue/__init__.py @@ -47,6 +47,7 @@ import traceback from cStringIO import StringIO from lazr.config import as_boolean, as_timedelta +from zope.component import getUtility from zope.interface import implements from mailman import i18n @@ -418,7 +419,7 @@ class Runner: # # Find out which mailing list this message is destined for. listname = unicode(msgdata.get('listname')) - mlist = IListManager(config).get(listname) + mlist = getUtility(IListManager).get(listname) if mlist is None: elog.error('Dequeuing message destined for missing list: %s', listname) diff --git a/src/mailman/queue/lmtp.py b/src/mailman/queue/lmtp.py index a198f8850..c07594c0e 100644 --- a/src/mailman/queue/lmtp.py +++ b/src/mailman/queue/lmtp.py @@ -37,6 +37,7 @@ import logging import asyncore from email.utils import parseaddr +from zope.component import getUtility from mailman.config import config from mailman.database.transaction import txn @@ -134,7 +135,7 @@ class LMTPRunner(Runner, smtpd.SMTPServer): try: # Refresh the list of list names every time we process a message # since the set of mailing lists could have changed. - listnames = set(IListManager(config).names) + listnames = set(getUtility(IListManager).names) qlog.debug('listnames: %s', listnames) # Parse the message data. If there are any defects in the # message, reject it right away; it's probably spam. |
