summaryrefslogtreecommitdiff
path: root/src/mailman/config/config.py
diff options
context:
space:
mode:
authorBarry Warsaw2014-12-29 17:44:58 -0500
committerBarry Warsaw2014-12-29 17:44:58 -0500
commit37e72b0a6aaefcb90bf7d9ef23fdf24c07979551 (patch)
tree2965659ef0ad71afc12dbc79c263ea513dc61b69 /src/mailman/config/config.py
parent477ac216b4abbd1f96ff4fa3a9583a76ca993dc3 (diff)
downloadmailman-37e72b0a6aaefcb90bf7d9ef23fdf24c07979551.tar.gz
mailman-37e72b0a6aaefcb90bf7d9ef23fdf24c07979551.tar.zst
mailman-37e72b0a6aaefcb90bf7d9ef23fdf24c07979551.zip
Back port from the py3 branch:
* You can access the system configuration via the resource path ``/3.0/system/configuration/<section>``. This returns a dictionary with the keys being the section's variables and the values being their value from ``mailman.cfg`` as verbatim strings. You can get a list of all section names via ``/3.0/system/configuration`` which returns a dictionary containing the ``http_etag`` and the section names as a sorted list under the ``sections`` key. The system configuration resource is read-only.
Diffstat (limited to 'src/mailman/config/config.py')
-rw-r--r--src/mailman/config/config.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mailman/config/config.py b/src/mailman/config/config.py
index 649d6c5e1..7181e23e9 100644
--- a/src/mailman/config/config.py
+++ b/src/mailman/config/config.py
@@ -97,6 +97,9 @@ class Configuration:
"""Delegate to the configuration object."""
return getattr(self._config, name)
+ def __iter__(self):
+ return iter(self._config)
+
def load(self, filename=None):
"""Load the configuration from the schema and config files."""
schema_file = config_file = None