From 3bff39a37563d61a88ea8240969651a4f01079fc Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Tue, 1 May 2001 06:24:32 +0000 Subject: process(): `received_time' should only be added to the message's metadata if it's not already there. Usually it will be since scripts/post and scripts/auto add it. Python 2.x's {}.setdefault() does this nicely. --- Mailman/Handlers/ToArchive.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Mailman/Handlers/ToArchive.py') diff --git a/Mailman/Handlers/ToArchive.py b/Mailman/Handlers/ToArchive.py index 5f536b728..1bf10c171 100644 --- a/Mailman/Handlers/ToArchive.py +++ b/Mailman/Handlers/ToArchive.py @@ -36,5 +36,5 @@ def process(mlist, msg, msgdata): # Send the message to the archiver queue archq = get_switchboard(mm_cfg.ARCHQUEUE_DIR) # Send the message to the queue - archq.enqueue(msg, msgdata, - received_time = time.time()) + msgdata.setdefault('received_time', time.time()) + archq.enqueue(msg, msgdata) -- cgit v1.2.3-70-g09d2