diff options
Diffstat (limited to 'src/mailman/interfaces')
| -rw-r--r-- | src/mailman/interfaces/domain.py | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/mailman/interfaces/domain.py b/src/mailman/interfaces/domain.py index e36ad03d3..baf8dafcb 100644 --- a/src/mailman/interfaces/domain.py +++ b/src/mailman/interfaces/domain.py @@ -45,7 +45,7 @@ class BadDomainSpecificationError(MailmanError): class IDomain(Interface): """Interface representing domains.""" - email_host = Attribute('The host name for email for this domain.') + mail_host = Attribute('The host name for email for this domain.') url_host = Attribute( 'The host name for the web interface for this domain.') @@ -80,50 +80,50 @@ class IDomain(Interface): class IDomainManager(Interface): """The manager of domains.""" - def add(email_host, description=None, base_url=None, contact_address=None): + def add(mail_host, description=None, base_url=None, contact_address=None): """Add a new domain. - :param email_host: The email host name for the domain. - :type email_host: string + :param mail_host: The email host name for the domain. + :type mail_host: string :param description: The description of the domain. :type description: string :param base_url: The base url, including the scheme for the web interface of the domain. If not given, it defaults to - http://`email_host`/ + http://`mail_host`/ :type base_url: string :param contact_address: The email contact address for the human managing the domain. If not given, defaults to - postmaster@`email_host` + postmaster@`mail_host` :type contact_address: string :return: The new domain object :rtype: `IDomain` - :raises `BadDomainSpecificationError`: when the `email_host` is + :raises `BadDomainSpecificationError`: when the `mail_host` is already registered. """ - def remove(email_host): + def remove(mail_host): """Remove the domain. - :param email_host: The email host name of the domain to remove. - :type email_host: string + :param mail_host: The email host name of the domain to remove. + :type mail_host: string :raises KeyError: if the named domain does not exist. """ - def __getitem__(email_host): + def __getitem__(mail_host): """Return the named domain. - :param email_host: The email host name of the domain to remove. - :type email_host: string + :param mail_host: The email host name of the domain to remove. + :type mail_host: string :return: The domain object. :rtype: `IDomain` :raises KeyError: if the named domain does not exist. """ - def get(email_host, default=None): + def get(mail_host, default=None): """Return the named domain. - :param email_host: The email host name of the domain to remove. - :type email_host: string + :param mail_host: The email host name of the domain to remove. + :type mail_host: string :param default: What to return if the named domain does not exist. :type default: object :return: The domain object or None if the named domain does not exist. @@ -136,11 +136,11 @@ class IDomainManager(Interface): :return: iterator over `IDomain`. """ - def __contains__(email_host): + def __contains__(mail_host): """Is this a known domain? - :param email_host: An email host name. - :type email_host: string + :param mail_host: An email host name. + :type mail_host: string :return: True if this domain is known. :rtype: bool """ |
