From 33ad4402b372695b9526f57c33dd8f05c0eeddb3 Mon Sep 17 00:00:00 2001
From: bwarsaw <>
Date: Mon, 22 Sep 2003 02:29:51 +0000
Subject: Backporting from the HEAD -- bin and cron scripts

---
 cron/gate_news | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

(limited to 'cron/gate_news')

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:
-- 
cgit v1.2.3