summaryrefslogtreecommitdiff
path: root/Mailman/configuration.py
diff options
context:
space:
mode:
authorBarry Warsaw2007-06-27 17:33:42 -0400
committerBarry Warsaw2007-06-27 17:33:42 -0400
commit9344d94ef8e0a92a27517b5bd5b34f57c9b7bfaa (patch)
treec12bd0bde71928c9dd5b22d4c46b2394c1bf46ba /Mailman/configuration.py
parent55b97d69b0c08e66215a673f3cd92ab7d260c714 (diff)
downloadmailman-9344d94ef8e0a92a27517b5bd5b34f57c9b7bfaa.tar.gz
mailman-9344d94ef8e0a92a27517b5bd5b34f57c9b7bfaa.tar.zst
mailman-9344d94ef8e0a92a27517b5bd5b34f57c9b7bfaa.zip
Convert the Switchboard test in test_runners.py to a doctest. Add an
ISwitchboard interface and modernize the Python code in the Switchboard.py implementation. The SAVE_MSGS_AS_PICKLES option is removed. Messages are always saved as pickles unless the metadata '_plaintext' key is present, though this should eventually go away too. In testall.py, put the entire VAR_PREFIX in a temporary directory. This helps the switchboard tests by not mixing their data with the installation's queue directories. The Configuration object now also ensures that all the queue and log directories exist -- one more step on the road to getting rid of the autoconf mess.
Diffstat (limited to 'Mailman/configuration.py')
-rw-r--r--Mailman/configuration.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Mailman/configuration.py b/Mailman/configuration.py
index 3247204b3..aa3e1f9cf 100644
--- a/Mailman/configuration.py
+++ b/Mailman/configuration.py
@@ -190,6 +190,14 @@ class Configuration(object):
for k in self.__dict__
if k.endswith('_DIR')])
+ def ensure_directories_exist(self):
+ for variable, directory in self.paths.items():
+ try:
+ os.makedirs(directory, 02775)
+ except OSError, e:
+ if e.errno <> errno.EEXIST:
+ raise
+
config = Configuration()