diff options
| author | Barry Warsaw | 2017-06-24 21:57:16 +0000 |
|---|---|---|
| committer | Barry Warsaw | 2017-06-24 21:57:16 +0000 |
| commit | e8b134b8f34a8226dd512ecc96a6c908d712663b (patch) | |
| tree | 9057e4acfb9b4db2c75542d13b41b8938ef99451 /src/mailman/interfaces/listmanager.py | |
| parent | 6a148f762d5ee4fd91505eb0aa165b759899019f (diff) | |
| download | mailman-e8b134b8f34a8226dd512ecc96a6c908d712663b.tar.gz mailman-e8b134b8f34a8226dd512ecc96a6c908d712663b.tar.zst mailman-e8b134b8f34a8226dd512ecc96a6c908d712663b.zip | |
Diffstat (limited to 'src/mailman/interfaces/listmanager.py')
| -rw-r--r-- | src/mailman/interfaces/listmanager.py | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/src/mailman/interfaces/listmanager.py b/src/mailman/interfaces/listmanager.py index 3f52d6f0e..dcd4ba152 100644 --- a/src/mailman/interfaces/listmanager.py +++ b/src/mailman/interfaces/listmanager.py @@ -94,22 +94,36 @@ class IListManager(Interface): :raise `ListAlreadyExistsError` if the named list already exists. """ - def get(fqdn_listname): + def get(list_spec): + """Return the mailing list with the given specification, if it exists. + + :param list_spec: Either the fully qualified name of the mailing list, + or its List-ID. If list_spec has an `@` in it, it's considered an + FQDN listname, otherwise it's considered a List-ID. + :type list_spec: str + :return: the matching mailing list or None if no matching list is + found. + :rtype: IMailingList + """ + + def get_by_fqdn(fqdn_listname): """Return the mailing list with the given name, if it exists. :param fqdn_listname: The fully qualified name of the mailing list. - :type fqdn_listname: Unicode. - :return: the matching `IMailingList` or None if the named list does - not exist. + :type fqdn_listname: str + :return: the matching mailing list or None if no matching list is + found. + :rtype: IMailingList """ def get_by_list_id(list_id): """Return the mailing list with the given list id, if it exists. - :param fqdn_listname: The fully qualified name of the mailing list. - :type fqdn_listname: Unicode. - :return: the matching `IMailingList` or None if the named list does - not exist. + :param list_id: The List-ID + :type list_id: str + :return: the matching mailing list or None if no matching list is + found. + :rtype: IMailingList """ def delete(mlist): |
