summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mailman/queue/archive.py2
-rw-r--r--mailman/queue/docs/archiver.txt8
2 files changed, 6 insertions, 4 deletions
diff --git a/mailman/queue/archive.py b/mailman/queue/archive.py
index 013f8c949..52e73d9c8 100644
--- a/mailman/queue/archive.py
+++ b/mailman/queue/archive.py
@@ -73,7 +73,7 @@ class ArchiveRunner(Runner):
del msg['date']
del msg['x-original-date']
msg['Date'] = received_time
- if originaldate:
+ if original_date:
msg['X-Original-Date'] = original_date
# Always put an indication of when we received the message.
msg['X-List-Received-Date'] = received_time
diff --git a/mailman/queue/docs/archiver.txt b/mailman/queue/docs/archiver.txt
index 43b6d4974..7737ef7d0 100644
--- a/mailman/queue/docs/archiver.txt
+++ b/mailman/queue/docs/archiver.txt
@@ -5,8 +5,10 @@ Mailman can archive to any number of archivers that adhere to the IArchiver
interface. By default, there's a Pipermail archiver.
>>> from mailman.app.lifecycle import create_list
+ >>> from mailman.configuration import config
>>> mlist = create_list(u'test@example.com')
>>> mlist.web_page_url = u'http://www.example.com/'
+ >>> config.db.commit()
>>> msg = message_from_string("""\
... From: aperson@example.com
@@ -17,7 +19,6 @@ interface. By default, there's a Pipermail archiver.
... First post!
... """)
- >>> from mailman.configuration import config
>>> from mailman.queue import Switchboard
>>> archiver_queue = Switchboard(config.ARCHQUEUE_DIR)
>>> ignore = archiver_queue.enqueue(msg, {}, listname=mlist.fqdn_listname)
@@ -29,7 +30,8 @@ interface. By default, there's a Pipermail archiver.
# The best we can do is verify some landmark exists. Let's use the
# Pipermail pickle file exists.
+ >>> listname = mlist.fqdn_listname
>>> import os
- >>> os.path.exists(os.path.join(config.PUBLIC_ARCHIVE_FILE_DIR,
- ... mlist.fqdn_listname, 'pipermail.pck'))
+ >>> os.path.exists(os.path.join(
+ ... config.PUBLIC_ARCHIVE_FILE_DIR, listname, 'pipermail.pck'))
True