Roundup Tracker - Issues

Message3678

Author ajaksu2
Recipients ajaksu2, schlatterbeck, yyz
Date 2009-04-02.22:33:14
Message-id <1238711595.31.0.788377411768.issue2550534@psf.upfronthosting.co.za>
In-reply-to
Sorry for taking so long to reply.

ISTM this will only happen when a mail delivery really fails, so mocking
should be used for testing. So, if that failure does happen, we will
certainly see the bug in the Python tracker.

This part of the patch is patently correct:
-        part = MIMEText(error)
+        part = MIMEText('\n'.join(error))

(unless there's a chance that error is a string, but I see no way to
achieve from current callers of mailer.bounce_message)

The change to multipart to allow attachments looks good to me too, but
I'm not sure if it's the only/best way to do it (nothing against it,
just lack of knowledge on my part).

This bit below I don't understand:
         else:
-            body.write(bounced_message.fp.read())
-        part = MIMEText(bounced_message.fp.read())
-        part['Content-Disposition'] = 'attachment'
-        for header in bounced_message.headers:
-            part.write(header)
+            part = MIMEText(bounced_message.fp.read())
         message.attach(part)

Again, not that I know it's wrong, I just can't say it's correct because
it's not obvious. I can't even understand it before the patch :/

Looks like a good patch that I must find a way to test (and soon!), so 
don't pay attention if I register a new user and set his email to
something invalid :)
History
Date User Action Args
2009-04-02 22:33:15ajaksu2setmessageid: <1238711595.31.0.788377411768.issue2550534@psf.upfronthosting.co.za>
2009-04-02 22:33:15ajaksu2setrecipients: + ajaksu2, schlatterbeck, yyz
2009-04-02 22:33:15ajaksu2linkissue2550534 messages
2009-04-02 22:33:14ajaksu2create