summaryrefslogtreecommitdiff
path: root/src/mailman/styles/manager.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/styles/manager.py
parentad07de3dcdbf0ef11b5b324b9521b748da207fc7 (diff)
downloadmailman-7e23b2f358806cb14b92dc7833ce773738534d41.tar.gz
mailman-7e23b2f358806cb14b92dc7833ce773738534d41.tar.zst
mailman-7e23b2f358806cb14b92dc7833ce773738534d41.zip
Diffstat (limited to 'src/mailman/styles/manager.py')
-rw-r--r--src/mailman/styles/manager.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mailman/styles/manager.py b/src/mailman/styles/manager.py
index e9682d7c5..fb7c54efd 100644
--- a/src/mailman/styles/manager.py
+++ b/src/mailman/styles/manager.py
@@ -33,6 +33,7 @@ from zope.interface.verify import verifyObject
from mailman.interfaces.styles import (
DuplicateStyleError, IStyle, IStyleManager)
+from mailman.utilities.modules import call_name
@@ -52,9 +53,7 @@ class StyleManager:
# Install all the styles described by the configuration files.
for section in config.style_configs:
class_path = section['class']
- package, dot, class_name = class_path.rpartition('.')
- __import__(package)
- style = getattr(sys.modules[package], class_name)()
+ style = call_name(class_path)
assert section.name.startswith('style'), (
'Bad style section name: %s' % section.name)
style.name = section.name[6:]