aboutsummaryrefslogtreecommitdiffstats
path: root/cron
diff options
context:
space:
mode:
authorDavid Planella <david.planella@gmail.com>2009-01-29 00:22:52 +0100
committerDavid Planella <david.planella@gmail.com>2009-01-29 00:22:52 +0100
commit518b3843c0117f24b1b277a724169fb616604e4d (patch)
tree01ab5cbe392ff3a8e851dae1be4eb3a8cf8ed439 /cron
parent42fcf522d7818e9e1ee922d1a68824b0f6dcc83d (diff)
parentc0da6af58657b1fe5730d3dea0e78bc17dac490a (diff)
downloadmailman2-518b3843c0117f24b1b277a724169fb616604e4d.tar.gz
mailman2-518b3843c0117f24b1b277a724169fb616604e4d.tar.xz
mailman2-518b3843c0117f24b1b277a724169fb616604e4d.zip
Merged from upstream
Diffstat (limited to 'cron')
-rwxr-xr-xcron/gate_news12
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