~barry/mailman/events-and-web

« back to all changes in this revision

Viewing changes to mailman/app/lifecycle.py

  • Committer: Barry Warsaw
  • Date: 2008-10-07 02:07:04 UTC
  • mfrom: (6643.2.7 reorg2)
  • Revision ID: barry@list.org-20081007020704-2oyjxp08f54ap7f1
branch merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
"""Application level list creation."""
19
19
 
 
20
__metaclass__ = type
 
21
__all__ = [
 
22
    'create_list',
 
23
    'remove_list',
 
24
    ]
 
25
 
 
26
 
20
27
import os
21
28
import sys
22
29
import shutil
23
30
import logging
24
31
 
25
 
from mailman import Errors
26
32
from mailman import Utils
27
33
from mailman.Utils import ValidateEmail
28
 
from mailman.app.plugins import get_plugin
29
 
from mailman.app.styles import style_manager
30
34
from mailman.configuration import config
 
35
from mailman.core import errors
 
36
from mailman.core.plugins import get_plugin
 
37
from mailman.core.styles import style_manager
31
38
from mailman.interfaces import MemberRole
32
39
 
33
 
__all__ = [
34
 
    'create_list',
35
 
    'remove_list',
36
 
    ]
37
 
 
38
40
 
39
41
log = logging.getLogger('mailman.error')
40
42
 
47
49
    ValidateEmail(fqdn_listname)
48
50
    listname, domain = Utils.split_listname(fqdn_listname)
49
51
    if domain not in config.domains:
50
 
        raise Errors.BadDomainSpecificationError(domain)
 
52
        raise errors.BadDomainSpecificationError(domain)
51
53
    mlist = config.db.list_manager.create(fqdn_listname)
52
54
    for style in style_manager.lookup(mlist):
53
55
        # XXX FIXME.  When we get rid of the wrapper object, this hack won't