diff options
| author | Barry Warsaw | 2009-05-16 11:08:46 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2009-05-16 11:08:46 -0400 |
| commit | 7e23b2f358806cb14b92dc7833ce773738534d41 (patch) | |
| tree | 5499b536a163ebb4dedab62f4f7a97b460cece18 /src/mailman/styles/manager.py | |
| parent | ad07de3dcdbf0ef11b5b324b9521b748da207fc7 (diff) | |
| download | mailman-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.py | 5 |
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:] |
