From 9ad8c1e5524bc9479fd356757016ec160f392dd7 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Wed, 26 Aug 2009 02:27:37 -0400 Subject: Instead of using an adapter, use a utility to get the mailing list manager. --- src/mailman/commands/cli_lists.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mailman/commands/cli_lists.py') diff --git a/src/mailman/commands/cli_lists.py b/src/mailman/commands/cli_lists.py index 23fe0282b..991e9b439 100644 --- a/src/mailman/commands/cli_lists.py +++ b/src/mailman/commands/cli_lists.py @@ -27,6 +27,7 @@ __all__ = [ ] +from zope.component import getUtility from zope.interface import implements from mailman.Utils import maketext @@ -76,7 +77,7 @@ class Lists: def process(self, args): """See `ICLISubCommand`.""" mailing_lists = [] - list_manager = IListManager(config) + list_manager = getUtility(IListManager) # Gather the matching mailing lists. for fqdn_name in sorted(list_manager.names): mlist = list_manager.get(fqdn_name) @@ -252,7 +253,7 @@ remove any residual archives.""")) assert len(args.listname) == 1, ( 'Unexpected positional arguments: %s' % args.listname) fqdn_listname = args.listname[0] - mlist = IListManager(config).get(fqdn_listname) + mlist = getUtility(IListManager).get(fqdn_listname) if mlist is None: if args.archives: log(_('No such list: $fqdn_listname; ' -- cgit v1.2.3-70-g09d2