summaryrefslogtreecommitdiff
path: root/mailman/config/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'mailman/config/config.py')
-rw-r--r--mailman/config/config.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/mailman/config/config.py b/mailman/config/config.py
index 3f717d3be..cbdea2aea 100644
--- a/mailman/config/config.py
+++ b/mailman/config/config.py
@@ -54,7 +54,6 @@ class Configuration(object):
self._config = None
self.filename = None
# Create various registries.
- self.archivers = {}
self.chains = {}
self.rules = {}
self.handlers = {}
@@ -174,10 +173,22 @@ class Configuration(object):
@property
def qrunner_configs(self):
+ """Iterate over all the qrunner configuration sections."""
for section in self._config.getByCategory('qrunner', []):
yield section
@property
+ def archivers(self):
+ """Iterate over all the enabled archivers."""
+ for section in self._config.getByCategory('archiver', []):
+ if not as_boolean(section.enable):
+ continue
+ class_path = section['class']
+ module_name, class_name = class_path.rsplit('.', 1)
+ __import__(module_name)
+ yield getattr(sys.modules[module_name], class_name)()
+
+ @property
def header_matches(self):
"""Iterate over all spam matching headers.