diff options
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 |