Revision: 8238
          http://svn.sourceforge.net/mailman/?rev=8238&view=rev
Author:   msapiro
Date:     2007-06-15 15:38:10 -0700 (Fri, 15 Jun 2007)

Log Message:
-----------
senddigests - Changed to catch exceptions thrown by mlist.send_digest_now() and
              report them and continue processing the remaining lists.

Modified Paths:
--------------
    branches/Release_2_1-maint/mailman/cron/senddigests

Modified: branches/Release_2_1-maint/mailman/cron/senddigests
===================================================================
--- branches/Release_2_1-maint/mailman/cron/senddigests 2007-06-15 22:22:33 UTC 
(rev 8237)
+++ branches/Release_2_1-maint/mailman/cron/senddigests 2007-06-15 22:38:10 UTC 
(rev 8238)
@@ -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 @@
         lists are sent out.
 """
 
+import os
 import sys
 import getopt
 
@@ -83,8 +85,18 @@
         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()
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to