[Mailman-Developers] Bug#57223: mailman: gate_news problems (fwd)
Thomas Wouters
thomas@xs4all.net
Mon, 7 Feb 2000 22:56:07 +0100
--3O1VwFp74L81IIeR
Content-Type: text/plain; charset=us-ascii
On Mon, Feb 07, 2000 at 08:09:18PM +0000, Lazarus Long wrote:
> On Mon, Feb 07, 2000 at 06:16:06PM +0100, Gergely Madarasz wrote:
> > Thanks.
> > Lazarus, please test this patch, and notify me if it worked for you :)
> Patching file `gate_news' using Plan A...
> Hunk #1 FAILED at 125.
> 1 out of 1 hunk FAILED -- saving rejects to gate_news.rej
Ok, the patch doesn't work for mailman-1.1 gate_news ;P I've attached a
version that should. Let me know if it still fails, or if you're using a
different version of mailman.
--
Thomas Wouters <thomas@xs4all.net>
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
--3O1VwFp74L81IIeR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="gate_news.diff"
--- cron/gate_news.orig Mon Feb 7 22:47:52 2000
+++ cron/gate_news Mon Feb 7 22:53:23 2000
@@ -76,7 +76,16 @@
# update the gate_watermarks file. we'll actually do the gating in a
# child process
conn = nntplib.NNTP(mlist.nntp_host)
- r,c,first,last,n = conn.group(mlist.linked_newsgroup)
+ try:
+ r,c,first,last,n = conn.group(mlist.linked_newsgroup)
+ except nntplib.error_perm:
+ # We got an error 500, probably meaning that the 'group' command
+ # is not implemented. A likely scenario causing this is when
+ # running the Mailman gateway on the same machine as the news
+ # server; the server defaults to news feed mode. We need to set
+ # the connection to reader mode first.
+ conn.shortcmd('mode reader')
+ r,c,first,last,n = conn.group(mlist.linked_newsgroup)
first = int(first)
last = int(last)
wm = watermarks.get(name, 0)
--3O1VwFp74L81IIeR--