summaryrefslogtreecommitdiff
path: root/src/mailman/app/lifecycle.py
diff options
context:
space:
mode:
authorBarry Warsaw2009-05-16 11:08:46 -0400
committerBarry Warsaw2009-05-16 11:08:46 -0400
commit7e23b2f358806cb14b92dc7833ce773738534d41 (patch)
tree5499b536a163ebb4dedab62f4f7a97b460cece18 /src/mailman/app/lifecycle.py
parentad07de3dcdbf0ef11b5b324b9521b748da207fc7 (diff)
downloadmailman-7e23b2f358806cb14b92dc7833ce773738534d41.tar.gz
mailman-7e23b2f358806cb14b92dc7833ce773738534d41.tar.zst
mailman-7e23b2f358806cb14b92dc7833ce773738534d41.zip
Diffstat (limited to 'src/mailman/app/lifecycle.py')
-rw-r--r--src/mailman/app/lifecycle.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mailman/app/lifecycle.py b/src/mailman/app/lifecycle.py
index 56eb88d32..051b7cec3 100644
--- a/src/mailman/app/lifecycle.py
+++ b/src/mailman/app/lifecycle.py
@@ -36,6 +36,7 @@ from mailman.config import config
from mailman.core import errors
from mailman.email.validate import validate
from mailman.interfaces.member import MemberRole
+from mailman.utilities.modules import call_name
log = logging.getLogger('mailman.error')
@@ -54,9 +55,7 @@ def create_list(fqdn_listname, owners=None):
for style in config.style_manager.lookup(mlist):
style.apply(mlist)
# Coordinate with the MTA, as defined in the configuration file.
- package, dot, class_name = config.mta.incoming.rpartition('.')
- __import__(package)
- getattr(sys.modules[package], class_name)().create(mlist)
+ call_name(config.mta.incoming).create(mlist)
# Create any owners that don't yet exist, and subscribe all addresses as
# owners of the mailing list.
usermgr = config.db.user_manager
@@ -83,9 +82,7 @@ def remove_list(fqdn_listname, mailing_list=None, archives=True):
# Delete the mailing list from the database.
config.db.list_manager.delete(mailing_list)
# Do the MTA-specific list deletion tasks
- package, dot, class_name = config.mta.incoming.rpartition('.')
- __import__(package)
- getattr(sys.modules[package], class_name)().create(mailing_list)
+ call_name(config.mta.incoming).create(mailing_list)
# Remove the list directory.
removeables.append(os.path.join(config.LIST_DATA_DIR, fqdn_listname))
# Remove any stale locks associated with the list.