rewindbody has ceased to be

Bug #265546 reported by Dmick
2
Affects Status Importance Assigned to Milestone
GNU Mailman
Fix Released
Medium
Unassigned

Bug Description

Two places still try to use msg.rewindbody(), but that interface doesn't
seem to exist in mimelib. It's bleedin' dead.

[http://sourceforge.net/tracker/index.php?func=detail&aid=464350&group_id=103&atid=100103]

Revision history for this message
Dmick (dmick) wrote :

Specifically, Bouncer.py calls it from
HandleBouncingAddress, after trying and failing to
get the body attribute. So perhaps the real problem
is "Bouncer hasn't been mimelib-ified". Now I'm
confused.

Revision history for this message
Dmick (dmick) wrote :

Regardless, it seems like the fix is to replace the
"robustly get message body" with a simple call
to get_payload():

218,228c218,219
< # 'bounce.txt' has a trailing newline. Be
robust about getting
< # the body of the message.
< body = _('[original message unavailable]')
< try:
< body = msg.body
< except AttributeError:
< try:
< msg.rewindbody()
< body = msg.fp.read()
< except IOError:
< pass
---
> # 'bounce.txt' has a trailing newline.
> body = msg.get_payload()

Revision history for this message
Dmick (dmick) wrote :

Indeed, HandleBouncingAddress needed a rewrite (and
got it in revision 2.13).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.