summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw2002-01-26 23:24:00 +0000
committerbwarsaw2002-01-26 23:24:00 +0000
commit4ba61326daedb8efbb0fbe141ce47ee99d31a891 (patch)
tree21aa2532d849c33903cbe89a14d12bceaed010cd
parente5642a356e1f3554646661b5c5f4eda81639fe30 (diff)
downloadmailman-4ba61326daedb8efbb0fbe141ce47ee99d31a891.tar.gz
mailman-4ba61326daedb8efbb0fbe141ce47ee99d31a891.tar.zst
mailman-4ba61326daedb8efbb0fbe141ce47ee99d31a891.zip
-rw-r--r--Mailman/Post.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/Mailman/Post.py b/Mailman/Post.py
index 8a9c87d40..a184f1cf7 100644
--- a/Mailman/Post.py
+++ b/Mailman/Post.py
@@ -1,6 +1,6 @@
#! /usr/bin/env python
#
-# Copyright (C) 2001 by the Free Software Foundation, Inc.
+# Copyright (C) 2001,2002 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -23,15 +23,17 @@ from Mailman.Queue.sbcache import get_switchboard
-def inject(listname, msg, recips=None):
- inq = get_switchboard(mm_cfg.INQUEUE_DIR)
+def inject(listname, msg, recips=None, qdir=None):
+ if qdir is None:
+ qdir = mm_cfg.INQUEUE_DIR
+ queue = get_switchboard(qdir)
kws = {'listname' : listname,
'tolist' : 1,
'_plaintext': 1,
}
if recips:
kws['recips'] = recips
- inq.enqueue(msg, **kws)
+ queue.enqueue(msg, **kws)