Bugs item #1569790, was opened at 2006-10-03 04:16 Message generated for change (Comment added) made by akuchling You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1569790&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.5 >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Matthias Klose (doko) >Assigned to: A.M. Kuchling (akuchling) Summary: mailbox.Maildir.get_folder() loses factory information Initial Comment: [forwarded from http://bugs.debian.org/384512] the factory defines what class the mails have that are returned. So for two nested folders a and a.b, the following code will return messages with two different classes: # factory = None to get mailbox.MaildirMessage objects md = mailbox.Maildir("a", factory=None) print md["somemessage"].__class__ # will print mailbox.MaildirMessage md2 = md.get_folder("b") print md2["someothermessage"].__class__ # will print rfc822.Message i.e. the factory= parameter passed to the outer Maildir class upon creation is not passed on to the subfolder creation in get_folder() ---------------------------------------------------------------------- >Comment By: A.M. Kuchling (akuchling) Date: 2006-11-09 08:34 Message: Logged In: YES user_id=11375 Committed to trunk in rev. 52690 and to 25-maint in rev. 52691. Thanks for the bug report! The MH class has the same bug, so I fixed that too. I've also attached the patch. If you wish you can incorporate the fix in Debian's patchset, or wait for Python 2.5.1. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1569790&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com