~syst3mw0rm/mailman/bug-890675

« back to all changes in this revision

Viewing changes to src/mailman/model/listmanager.py

  • Committer: Barry Warsaw
  • Date: 2012-01-27 21:45:39 UTC
  • Revision ID: barry@list.org-20120127214539-qwajvu11heo1ghxu
 * Add property `IListmanager.name_compoments` which returns 2-tuples for
   every mailing list as (list_name, mail_host).

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
                                                      MailingList.list_name):
96
96
            yield '{0}@{1}'.format(list_name, mail_host)
97
97
 
 
98
    @property
 
99
    def name_components(self):
 
100
        """See `IListManager`."""
 
101
        result_set = config.db.store.find(MailingList)
 
102
        for mail_host, list_name in result_set.values(MailingList.mail_host, 
 
103
                                                      MailingList.list_name):
 
104
            yield list_name, mail_host
 
105
 
98
106
    # XXX 2010-02-24 barry Get rid of this.
99
107
    def get_mailing_lists(self):
100
108
        """See `IListManager`."""