diff options
author | bwarsaw <> | 2005-12-30 18:50:08 +0000 |
---|---|---|
committer | bwarsaw <> | 2005-12-30 18:50:08 +0000 |
commit | d44c2c9f011075a7f6b6ffebe22ec3f17dda3a26 (patch) | |
tree | 6199ed049dba0f377f628b9c57a08b1ff9c3f500 /Mailman/Handlers/ToDigest.py | |
parent | 11ba661517e7606f5f38a8be87f68b32bff0afd4 (diff) | |
download | mailman2-d44c2c9f011075a7f6b6ffebe22ec3f17dda3a26.tar.gz mailman2-d44c2c9f011075a7f6b6ffebe22ec3f17dda3a26.tar.xz mailman2-d44c2c9f011075a7f6b6ffebe22ec3f17dda3a26.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | Mailman/Handlers/ToDigest.py | 22 |
1 files changed, 10 insertions, 12 deletions
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: |