This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dlam
Recipients dlam, josemaria, kasun, me, r.david.murray, thomas.holmes
Date 2011-09-15.00:29:46
SpamBayes Score 2.9324423e-05
Marked as misclassified No
Message-id <1316046588.63.0.763803137504.issue12537@psf.upfronthosting.co.za>
In-reply-to
Content
Hi hi, noob here. I found this today after clicking 'Easy issues' link. 

Would something like this work?  test_mailbox.py seems to pass. However, I'm not too sure what more needs to be done in the _explain_to. It seems like everything to convert headers/flags between message formats are already there ?


diff -r 63bf3bae20ef Lib/mailbox.py
--- a/Lib/mailbox.py    Wed Sep 14 11:46:17 2011 -0400
+++ b/Lib/mailbox.py    Wed Sep 14 17:12:51 2011 -0700
@@ -1467,8 +1467,7 @@
 
     def _become_message(self, message):
         """Assume the non-format-specific state of message."""
-        for name in ('_headers', '_unixfrom', '_payload', '_charset',
-                     'preamble', 'epilogue', 'defects', '_default_type'):
+        for name in message.__dict__:
             self.__dict__[name] = message.__dict__[name]
History
Date User Action Args
2011-09-15 00:29:48dlamsetrecipients: + dlam, r.david.murray, thomas.holmes, kasun, josemaria, me
2011-09-15 00:29:48dlamsetmessageid: <1316046588.63.0.763803137504.issue12537@psf.upfronthosting.co.za>
2011-09-15 00:29:48dlamlinkissue12537 messages
2011-09-15 00:29:46dlamcreate