summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw2002-04-19 21:21:32 +0000
committerbwarsaw2002-04-19 21:21:32 +0000
commit86270a26996f490f0021a3ad59fa1bb6607486b4 (patch)
tree68d99c75e19214a0dce70d7a719614423af47a25
parent3e60c08b4da9a7971a47dda85fc97d97087ed001 (diff)
downloadmailman-86270a26996f490f0021a3ad59fa1bb6607486b4.tar.gz
mailman-86270a26996f490f0021a3ad59fa1bb6607486b4.tar.zst
mailman-86270a26996f490f0021a3ad59fa1bb6607486b4.zip
HOLD_MESSAGES_AS_PICKLES: Promote to an mm_cfg.py configuration variable.
-rw-r--r--Mailman/Defaults.py.in6
-rw-r--r--Mailman/ListAdmin.py10
2 files changed, 8 insertions, 8 deletions
diff --git a/Mailman/Defaults.py.in b/Mailman/Defaults.py.in
index 04f9051b8..d3f49f644 100644
--- a/Mailman/Defaults.py.in
+++ b/Mailman/Defaults.py.in
@@ -665,6 +665,12 @@ OWNERS_CAN_DELETE_THEIR_OWN_LISTS = 0
# have a heavy impact on the performance of your system.
OWNERS_CAN_ENABLE_PERSONALIZATION = 0
+# Should held messages be saved on disk as Python pickles or as plain text?
+# The former is more efficient since we don't need to go through the
+# parse/generate roundtrip each time, but the latter might be preferred if you
+# want to edit the held message on disk.
+HOLD_MESSAGES_AS_PICKLES = 1
+
# These define the available types of external message metadata formats, and
# the one to use by default. MARSHAL format uses Python's built-in marshal
# module. BSDDB_NATIVE uses the bsddb module compiled into Python, which
diff --git a/Mailman/ListAdmin.py b/Mailman/ListAdmin.py
index 781cc6d33..fd402ab76 100644
--- a/Mailman/ListAdmin.py
+++ b/Mailman/ListAdmin.py
@@ -59,12 +59,6 @@ LOST = 2
DASH = '-'
NL = '\n'
-# Should held messages be saved on disk as Python pickles or as plain text?
-# The former is more efficient since we don't need to go through the
-# parse/generate roundtrip each time, but the latter might be preferred if you
-# want to edit the held message on disk.
-HOLD_MESSAGES_AS_PICKLES = 1
-
class ListAdmin:
@@ -208,7 +202,7 @@ class ListAdmin:
# get the message sender
sender = msg.get_sender()
# calculate the file name for the message text and write it to disk
- if HOLD_MESSAGES_AS_PICKLES:
+ if mm_cfg.HOLD_MESSAGES_AS_PICKLES:
ext = 'pck'
else:
ext = 'txt'
@@ -217,7 +211,7 @@ class ListAdmin:
fp = None
try:
fp = open(os.path.join(mm_cfg.DATA_DIR, filename), 'w')
- if HOLD_MESSAGES_AS_PICKLES:
+ if mm_cfg.HOLD_MESSAGES_AS_PICKLES:
cPickle.dump(msg, fp, 1)
else:
g = Generator(fp)