gate_news: Handling missing groups

Bug #265941 reported by Nizz
14
Affects Status Importance Assigned to Milestone
GNU Mailman
Fix Released
Medium
Mark Sapiro

Bug Description

At the moment, if a non-existing newsgroup is chosen
for mirroring, we break out of the loop:

    for listname in Utils.list_names():
[...]
        try:
            conn, first, last = open_newsgroup(mlist)
        except (socket.error, nntplib.NNTPError):
            break
[...]

I believe that, at least for some NNTPErrors, we should
do a "continue" instead.

My naive patch would be this:

        try:
            conn, first, last = open_newsgroup(mlist)
        except nntplib.NNTPError:
            continue
        except socket.error:
            break

But if people have good reason to break on
othernNTPErrors, we might want to do a more finegrained
check.

[http://sourceforge.net/tracker/index.php?func=detail&aid=775100&group_id=103&atid=100103]

Tags: nntp-news

Related branches

Revision history for this message
Markus Grabner (grabner-icg) wrote :

I encountered the same problem and applied the same fix as proposed by Nis (and added a log message in the case of an NNTPError). It runs fine, i.e., the offending newsgroup is reported in the log file, but other groups are still processed correctly. Can the attached patch be applied to the next release, or do you see any problems with this?

Kind regards,
Markus

Revision history for this message
Mark Sapiro (msapiro) wrote :

Fixes committed for 2.1 and 2.2.

Changed in mailman:
assignee: nobody → msapiro
status: New → Fix Committed
Revision history for this message
Ike (icarus) wrote :

Hi!

I guess this patch helps. But it breaks syncing if someone is misstyping the news server name. Wouldn't a simple "continue" without any "break" be the best solution?

Revision history for this message
Mark Sapiro (msapiro) wrote :

Ike wrote:

> Wouldn't a simple "continue" without any "break" be the best solution?

That's the fix that was actually committed. See, e.g., http://bazaar.launchpad.net/~mailman-coders/mailman/2.1/revision/1128

Mark Sapiro (msapiro)
Changed in mailman:
milestone: none → 2.1.12
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.