diff options
| author | bwarsaw | 2002-10-15 19:01:14 +0000 |
|---|---|---|
| committer | bwarsaw | 2002-10-15 19:01:14 +0000 |
| commit | 4b8fb0ef367fa7f057f524e8428504c42ae91522 (patch) | |
| tree | 5063c6a428c14be580be989a0bd9f9883faac3f6 /cron | |
| parent | 21fec6ecbf18716a61bbcf2ed945629734d26d4b (diff) | |
| download | mailman-4b8fb0ef367fa7f057f524e8428504c42ae91522.tar.gz mailman-4b8fb0ef367fa7f057f524e8428504c42ae91522.tar.zst mailman-4b8fb0ef367fa7f057f524e8428504c42ae91522.zip | |
open_newsgroup(): SF bug # 620033 indicates that an IOError can be
raised in the NNTP() constructor. Just catch it, log it, and move on.
Also, whitespace normalization.
Diffstat (limited to 'cron')
| -rwxr-xr-x | cron/gate_news | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cron/gate_news b/cron/gate_news index 0500b9cff..d38a36c27 100755 --- a/cron/gate_news +++ b/cron/gate_news @@ -6,14 +6,14 @@ # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software +# along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. """Poll the NNTP servers for messages to be gatewayed to mailing lists. @@ -87,7 +87,7 @@ def open_newsgroup(mlist): conn = nntplib.NNTP(mlist.nntp_host, readermode=1, user=mm_cfg.NNTP_USERNAME, password=mm_cfg.NNTP_PASSWORD) - except (socket.error, nntplib.NNTPError), e: + except (socket.error, nntplib.NNTPError, IOError), e: syslog('fromusenet', 'error opening connection to nntp_host: %s\n%s', mlist.nntp_host, e) @@ -251,7 +251,7 @@ def main(): finally: clearcache() lock.unlock(unconditionally=1) - + if __name__ == '__main__': |
