diff options
| author | bwarsaw | 2000-06-03 04:19:35 +0000 |
|---|---|---|
| committer | bwarsaw | 2000-06-03 04:19:35 +0000 |
| commit | a3f4889fa46a87968692de80a7d83bff4463ac54 (patch) | |
| tree | ca2214e0b619961724d545584971a544c7925912 | |
| parent | 4b2a1d886f64aac393cae0714f39c689d64322f4 (diff) | |
| download | mailman-a3f4889fa46a87968692de80a7d83bff4463ac54.tar.gz mailman-a3f4889fa46a87968692de80a7d83bff4463ac54.tar.zst mailman-a3f4889fa46a87968692de80a7d83bff4463ac54.zip | |
poll_newsgroup(): MailList objects don't have a Post() method
anymore. Use HandlerAPI.DeliverToList().
| -rwxr-xr-x | cron/gate_news | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cron/gate_news b/cron/gate_news index 35366c75c..4e91423c8 100755 --- a/cron/gate_news +++ b/cron/gate_news @@ -43,13 +43,14 @@ import time import traceback import socket import getopt -from errno import EEXIST +import errno import paths from Mailman import mm_cfg from Mailman import MailList from Mailman import Utils from Mailman import Message +from Mailman.Handlers import HandlerAPI from Mailman.Logging.Utils import LogStdErr # The version we have is from Python 1.5.2+ and fixes the "mode reader" @@ -115,7 +116,7 @@ def poll_newsgroup(mlist, conn, first, last): if VERBOSE: sys.stderr.write('posting msgid %d to list %s\n' % (num, mlist.internal_name())) - mlist.Post(msg) + HandlerAPI.DeliverToList(mlist, msg, {}) # record the last gated article number mlist.usenet_watermark = num if VERBOSE: @@ -223,7 +224,7 @@ def main(): fd = os.open(blockfile, os.O_CREAT | os.O_EXCL) os.close(fd) except OSError, e: - if e.errno <> EEXIST: + if e.errno <> errno.EEXIST: raise # some other gate_news process is already running if VERBOSE: |
