diff options
| author | Mark Sapiro | 2017-02-20 18:36:36 -0800 |
|---|---|---|
| committer | Mark Sapiro | 2017-02-20 18:36:36 -0800 |
| commit | 5d2883cb22e36bc8fe1275ae911b2fd97e6e9da1 (patch) | |
| tree | ead93ea43388b216263eb436068739545eb703d9 /src/mailman/app/lifecycle.py | |
| parent | c39ef107c1765f1eb937bfcaae2e23dda0b4c581 (diff) | |
| download | mailman-5d2883cb22e36bc8fe1275ae911b2fd97e6e9da1.tar.gz mailman-5d2883cb22e36bc8fe1275ae911b2fd97e6e9da1.tar.zst mailman-5d2883cb22e36bc8fe1275ae911b2fd97e6e9da1.zip | |
Diffstat (limited to 'src/mailman/app/lifecycle.py')
| -rw-r--r-- | src/mailman/app/lifecycle.py | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/mailman/app/lifecycle.py b/src/mailman/app/lifecycle.py index e373bf4d9..e79073929 100644 --- a/src/mailman/app/lifecycle.py +++ b/src/mailman/app/lifecycle.py @@ -23,11 +23,11 @@ import logging from contextlib import suppress from mailman.config import config -from mailman.interfaces.address import ( - IEmailValidator, InvalidEmailAddressError) +from mailman.interfaces.address import IEmailValidator from mailman.interfaces.domain import ( BadDomainSpecificationError, IDomainManager) from mailman.interfaces.listmanager import IListManager +from mailman.interfaces.mailinglist import InvalidListNameError from mailman.interfaces.member import MemberRole from mailman.interfaces.styles import IStyleManager from mailman.interfaces.usermanager import IUserManager @@ -37,18 +37,11 @@ from zope.component import getUtility log = logging.getLogger('mailman.error') -# These are the only characters allowed in list names. +# These are the only characters allowed in list names. A more restrictive +# class can be specified in config.mailman.listname_chars. _listname_chars = re.compile('[-_.+=!$*{}~0-9a-z]', re.IGNORECASE) -class InvalidListNameError(InvalidEmailAddressError): - """List name is invalid.""" - - def __init__(self, listname): - super().__init__('{}@any.example.com'.format(listname)) - self.listname = listname - - @public def create_list(fqdn_listname, owners=None, style_name=None): """Create the named list and apply styles. |
