summaryrefslogtreecommitdiff
path: root/src/mailman/app/lifecycle.py
diff options
context:
space:
mode:
authorBarry Warsaw2011-01-06 16:19:00 -0500
committerBarry Warsaw2011-01-06 16:19:00 -0500
commitd0112b5dc950b8d0180997b6e6dc71bd66af1ee8 (patch)
tree2f1143c787c69dd224d763917bc3d1f0154dbc06 /src/mailman/app/lifecycle.py
parentc7e794caecb8b12d250be92f698fed8fa1f8a101 (diff)
downloadmailman-d0112b5dc950b8d0180997b6e6dc71bd66af1ee8.tar.gz
mailman-d0112b5dc950b8d0180997b6e6dc71bd66af1ee8.tar.zst
mailman-d0112b5dc950b8d0180997b6e6dc71bd66af1ee8.zip
Diffstat (limited to 'src/mailman/app/lifecycle.py')
-rw-r--r--src/mailman/app/lifecycle.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mailman/app/lifecycle.py b/src/mailman/app/lifecycle.py
index 39ec09aa7..b30266f3b 100644
--- a/src/mailman/app/lifecycle.py
+++ b/src/mailman/app/lifecycle.py
@@ -33,7 +33,7 @@ import logging
from zope.component import getUtility
from mailman.config import config
-from mailman.email.validate import validate
+from mailman.interfaces.address import IEmailValidator
from mailman.interfaces.domain import (
BadDomainSpecificationError, IDomainManager)
from mailman.interfaces.listmanager import IListManager
@@ -58,13 +58,15 @@ def create_list(fqdn_listname, owners=None):
:type owners: list of string email addresses
:return: The new mailing list.
:rtype: `IMailingList`
- :raises `BadDomainSpecificationError`: when the hostname part of
+ :raises BadDomainSpecificationError: when the hostname part of
`fqdn_listname` does not exist.
- :raises `ListAlreadyExistsError`: when the mailing list already exists.
+ :raises ListAlreadyExistsError: when the mailing list already exists.
+ :raises InvalidEmailAddressError: when the fqdn email address is invalid.
"""
if owners is None:
owners = []
- validate(fqdn_listname)
+ # This raises I
+ getUtility(IEmailValidator).validate(fqdn_listname)
# pylint: disable-msg=W0612
listname, domain = fqdn_listname.split('@', 1)
if domain not in getUtility(IDomainManager):