aboutsummaryrefslogtreecommitdiffstats
path: root/cron/gate_news
diff options
context:
space:
mode:
Diffstat (limited to 'cron/gate_news')
-rwxr-xr-xcron/gate_news14
1 files changed, 12 insertions, 2 deletions
diff --git a/cron/gate_news b/cron/gate_news
index 3fe466d4..19ccb2c6 100755
--- a/cron/gate_news
+++ b/cron/gate_news
@@ -1,6 +1,6 @@
#! @PYTHON@
#
-# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2003 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -67,6 +67,13 @@ class _ContinueLoop(Exception):
pass
+try:
+ True, False
+except NameError:
+ True = 1
+ False = 0
+
+
def usage(status, msg=''):
if code:
@@ -83,12 +90,15 @@ def usage(status, msg=''):
_hostcache = {}
def open_newsgroup(mlist):
+ # Split host:port if given
+ nntp_host, nntp_port = Utils.nntpsplit(mlist.nntp_host)
# Open up a "mode reader" connection to nntp server. This will be shared
# for all the gated lists having the same nntp_host.
conn = _hostcache.get(mlist.nntp_host)
if conn is None:
try:
- conn = nntplib.NNTP(mlist.nntp_host, readermode=1,
+ conn = nntplib.NNTP(nntp_host, nntp_port,
+ readermode=True,
user=mm_cfg.NNTP_USERNAME,
password=mm_cfg.NNTP_PASSWORD)
except (socket.error, nntplib.NNTPError, IOError), e: