From d44c2c9f011075a7f6b6ffebe22ec3f17dda3a26 Mon Sep 17 00:00:00 2001 From: bwarsaw <> Date: Fri, 30 Dec 2005 18:50:08 +0000 Subject: A cleansing pass, almost entirely cosmetic. Such things as whitespace normalization, removal of tabs, copyright year updates to changed files, docstring and comment fixes, and usage of True/False. I also made a pass through the NEWS file. One import was reordered, and after this commit I will move the mmdsr.readme file to README.mmdsr. From my perspective, after that we're ready to go. I will port these changes forward to the trunk. --- Mailman/Handlers/ToDigest.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'Mailman/Handlers/ToDigest.py') diff --git a/Mailman/Handlers/ToDigest.py b/Mailman/Handlers/ToDigest.py index b0f948ac..e796a874 100644 --- a/Mailman/Handlers/ToDigest.py +++ b/Mailman/Handlers/ToDigest.py @@ -12,10 +12,10 @@ # # 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. -"""Add the message to the list's current digest and possibly send it. -""" +"""Add the message to the list's current digest and possibly send it.""" # Messages are accumulated to a Unix mailbox compatible file containing all # the messages destined for the digest. This file must be parsable by the @@ -90,19 +90,17 @@ def process(mlist, msg, msgdata): # This is a bit of a kludge to get the mbox file moved to the digest # queue directory. try: - # Let's close in try - except here because a error in send_digest - # can stop regular delivery silently. Unsuccessful digest - # delivery should be tried again by cron and the site - # administrator will be notified of any error explicitly by the - # cron error message. + # Enclose in try/except here because a error in send_digest() can + # silently stop regular delivery. Unsuccessful digest delivery + # should be tried again by cron and the site administrator will be + # notified of any error explicitly by the cron error message. mboxfp.seek(0) send_digests(mlist, mboxfp) os.unlink(mboxfile) except Exception, errmsg: - # I know bare except is prohibited in mailman coding but we can't - # forcast what new exception can occur here. + # Bare except is generally prohibited in Mailman, but we can't + # forecast what exceptions can occur here. syslog('error', 'send_digests() failed: %s', errmsg) - pass mboxfp.close() @@ -341,7 +339,7 @@ def send_i18n_digests(mlist, mboxfp): else: # If decoded payload is empty, this may be multipart message. # -- just stringfy it. - payload = msg.get_payload(decode=True)\ + payload = msg.get_payload(decode=True) \ or msg.as_string().split('\n\n',1)[1] mcset = msg.get_content_charset('') if mcset and mcset <> lcset and mcset <> lcset_out: -- cgit v1.2.3