From f092ac24ad774e5cd796a74b112c4650038ef28b Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Tue, 18 Aug 2015 14:58:02 -0700 Subject: Fixed cron/gate_news to catch EOFError on opening the newsgroup. --- cron/gate_news | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cron/gate_news') diff --git a/cron/gate_news b/cron/gate_news index c66c09e0..8b6476a3 100755 --- a/cron/gate_news +++ b/cron/gate_news @@ -1,6 +1,6 @@ #! @PYTHON@ # -# Copyright (C) 1998-2011 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2015 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 @@ -101,7 +101,7 @@ def open_newsgroup(mlist): readermode=True, user=mm_cfg.NNTP_USERNAME, password=mm_cfg.NNTP_PASSWORD) - except (socket.error, nntplib.NNTPError, IOError), e: + except (socket.error, nntplib.NNTPError, IOError, EOFError), e: syslog('fromusenet', 'error opening connection to nntp_host: %s\n%s', mlist.nntp_host, e) @@ -212,7 +212,7 @@ def process_lists(glock): # Open the newsgroup, but let most exceptions percolate up. try: conn, first, last = open_newsgroup(mlist) - except (socket.error, nntplib.NNTPError), e: + except (socket.error, nntplib.NNTPError, IOError, EOFError), e: syslog('fromusenet', "%s: couldn't open newsgroup %s: skipping\n%s", listname, mlist.linked_newsgroup, e) -- cgit v1.2.3