summaryrefslogtreecommitdiff
path: root/src/mailman/queue/docs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/queue/docs')
-rw-r--r--src/mailman/queue/docs/news.txt6
-rw-r--r--src/mailman/queue/docs/runner.txt4
2 files changed, 6 insertions, 4 deletions
diff --git a/src/mailman/queue/docs/news.txt b/src/mailman/queue/docs/news.txt
index c9f2417a0..a0535babc 100644
--- a/src/mailman/queue/docs/news.txt
+++ b/src/mailman/queue/docs/news.txt
@@ -7,8 +7,8 @@ NNTP newsgroup. One of the most important things this runner does is prepare
the message for Usenet (yes, I know that NNTP is not Usenet, but this runner
was originally written to gate to Usenet, which has its own rules).
- >>> from mailman.queue.news import prepare_message
- >>> mlist = config.db.list_manager.create('_xtest@example.com')
+ >>> from mailman.app.lifecycle import create_list
+ >>> mlist = create_list('_xtest@example.com')
>>> mlist.linked_newsgroup = 'comp.lang.python'
Some NNTP servers such as INN reject messages containing a set of prohibited
@@ -33,6 +33,8 @@ prohibited headers.
... A message
... """)
>>> msgdata = {}
+
+ >>> from mailman.queue.news import prepare_message
>>> prepare_message(mlist, msg, msgdata)
>>> msgdata['prepped']
True
diff --git a/src/mailman/queue/docs/runner.txt b/src/mailman/queue/docs/runner.txt
index 032ea4c50..2c07f30ca 100644
--- a/src/mailman/queue/docs/runner.txt
+++ b/src/mailman/queue/docs/runner.txt
@@ -15,8 +15,8 @@ The basic architecture of qrunner is implemented in the base class that all
runners inherit from. This base class implements a .run() method that runs
continuously in a loop until the .stop() method is called.
- >>> mlist = config.db.list_manager.create('_xtest@example.com')
- >>> mlist.preferred_language = 'en'
+ >>> from mailman.app.lifecycle import create_list
+ >>> mlist = create_list('_xtest@example.com')
Here is a very simple derived qrunner class. Queue runners use a
configuration section in the configuration files to determine run