diff options
author | msapiro <> | 2007-06-15 22:38:10 +0000 |
---|---|---|
committer | msapiro <> | 2007-06-15 22:38:10 +0000 |
commit | bf41c50241c71ef9cd3b295928196996afd11dd7 (patch) | |
tree | 84945e32b7f34879325d4cb7b5abfd29cd2ef708 | |
parent | 04b442cce3d2a853318ebebd13449da3a7cd8c96 (diff) | |
download | mailman2-bf41c50241c71ef9cd3b295928196996afd11dd7.tar.gz mailman2-bf41c50241c71ef9cd3b295928196996afd11dd7.tar.xz mailman2-bf41c50241c71ef9cd3b295928196996afd11dd7.zip |
senddigests - Changed to catch exceptions thrown by mlist.send_digest_now() and
report them and continue processing the remaining lists.
-rwxr-xr-x | cron/senddigests | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/cron/senddigests b/cron/senddigests index d3f2781b..9c524dd4 100755 --- a/cron/senddigests +++ b/cron/senddigests @@ -1,6 +1,6 @@ -#! @PYTHON@ +#! /usr/bin/python # -# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2007 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 @@ -14,7 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. """Dispatch digests for lists w/pending messages and digest_send_periodic set. @@ -30,6 +31,7 @@ Options: lists are sent out. """ +import os import sys import getopt @@ -83,8 +85,18 @@ def main(): if mlist.digest_send_periodic: mlist.Lock() try: - mlist.send_digest_now() - mlist.Save() + try: + mlist.send_digest_now() + mlist.Save() + # We are unable to predict what exception may occur in digest + # processing and we don't want to lose the other digests, so + # we catch everything. + except Exception, errmsg: + print >> sys.stderr, \ + 'List: %s: problem processing %s:\n%s' % \ + (listname, + os.path.join(mlist.fullpath(), 'digest.mbox'), + errmsg) finally: mlist.Unlock() |