diff options
author | David Planella <david.planella@gmail.com> | 2009-01-29 00:22:52 +0100 |
---|---|---|
committer | David Planella <david.planella@gmail.com> | 2009-01-29 00:22:52 +0100 |
commit | 518b3843c0117f24b1b277a724169fb616604e4d (patch) | |
tree | 01ab5cbe392ff3a8e851dae1be4eb3a8cf8ed439 /cron/gate_news | |
parent | 42fcf522d7818e9e1ee922d1a68824b0f6dcc83d (diff) | |
parent | c0da6af58657b1fe5730d3dea0e78bc17dac490a (diff) | |
download | mailman2-518b3843c0117f24b1b277a724169fb616604e4d.tar.gz mailman2-518b3843c0117f24b1b277a724169fb616604e4d.tar.xz mailman2-518b3843c0117f24b1b277a724169fb616604e4d.zip |
Merged from upstream
Diffstat (limited to 'cron/gate_news')
-rwxr-xr-x | cron/gate_news | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/cron/gate_news b/cron/gate_news index a44257cd..9eea84ce 100755 --- a/cron/gate_news +++ b/cron/gate_news @@ -131,6 +131,9 @@ def poll_newsgroup(mlist, conn, first, last, glock): glock.refresh() try: headers = conn.head(`num`)[3] + # I don't know how this happens, but skip an empty message. + if not headers: + raise _ContinueLoop found_to = 0 beenthere = 0 for header in headers: @@ -184,9 +187,12 @@ def poll_newsgroup(mlist, conn, first, last, glock): syslog('fromusenet', str(e)) except _ContinueLoop: continue - # Even if we don't post the message because it was seen on the - # list already, update the watermark - mlist.usenet_watermark = num + # Even if we don't post the message because it was seen on the + # list already, or if we skipped it as unparseable or empty, + # update the watermark. Note this used to be in the 'for' block + # but if the last message(s) raised _ContinueLoop, they wouldn't + # update the watermark. + mlist.usenet_watermark = num |