[Mailman-Developers] ToUsenet should use the new nntplib, modereader
Jim Tittsler
jwt@dskk.co.jp
Tue, 21 Mar 2000 15:22:44 +0900
--yrj/dFKFPuw6o+aM
Content-Type: text/plain; charset=us-ascii
Barry,
Posting also requires the server to be in 'mode reader' (at least our INN
does). I think you only updated the cron/gatenews...
Jim
--
Jim Tittsler, Tokyo
Python Starship http://starship.python.net/crew/jwt/
--yrj/dFKFPuw6o+aM
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="ToUsenet.diff"
--- Mailman/Handlers/ToUsenet.py.orig Mon Feb 14 15:12:39 2000
+++ Mailman/Handlers/ToUsenet.py Tue Mar 21 15:15:57 2000
@@ -23,6 +23,10 @@
from Mailman.pythonlib.StringIO import StringIO
+# The version we have is from Python 1.5.2+ and fixes the "mode reader"
+# problem.
+from Mailman.pythonlib import nntplib
+
def process(mlist, msg):
@@ -123,7 +127,7 @@
# flatten the message object, stick it in a StringIO object and post
# that resulting thing to the newsgroup
fp = StringIO(str(msg))
- conn = nntplib.NNTP(mlist.nntp_host)
+ conn = nntplib.NNTP(mlist.nntp_host, readermode=1)
try:
try:
conn.post(fp)
--yrj/dFKFPuw6o+aM--