[Python-checkins] r71046 - in python/trunk: Lib/mailbox.py Lib/test/test_mailbox.py Misc/NEWS
r.david.murray
python-checkins at python.org
Thu Apr 2 16:05:35 CEST 2009
Author: r.david.murray
Date: Thu Apr 2 16:05:35 2009
New Revision: 71046
Log:
Add missing iteritems() call to the for loop in mailbox.MH.get_message().
Fixes issue2625.
Modified:
python/trunk/Lib/mailbox.py
python/trunk/Lib/test/test_mailbox.py
python/trunk/Misc/NEWS
Modified: python/trunk/Lib/mailbox.py
==============================================================================
--- python/trunk/Lib/mailbox.py (original)
+++ python/trunk/Lib/mailbox.py Thu Apr 2 16:05:35 2009
@@ -911,7 +911,7 @@
_unlock_file(f)
finally:
f.close()
- for name, key_list in self.get_sequences():
+ for name, key_list in self.get_sequences().iteritems():
if key in key_list:
msg.add_sequence(name)
return msg
Modified: python/trunk/Lib/test/test_mailbox.py
==============================================================================
--- python/trunk/Lib/test/test_mailbox.py (original)
+++ python/trunk/Lib/test/test_mailbox.py Thu Apr 2 16:05:35 2009
@@ -936,6 +936,12 @@
self._box.remove(key1)
self.assert_(self._box.get_sequences() == {'flagged':[key0]})
+ def test_issue2625(self):
+ msg0 = mailbox.MHMessage(self._template % 0)
+ msg0.add_sequence('foo')
+ key0 = self._box.add(msg0)
+ refmsg0 = self._box.get_message(key0)
+
def test_pack(self):
# Pack the contents of the mailbox
msg0 = mailbox.MHMessage(self._template % 0)
Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS (original)
+++ python/trunk/Misc/NEWS Thu Apr 2 16:05:35 2009
@@ -202,6 +202,9 @@
Library
-------
+- Issue 2625: added missing iteritems() call to the for loop in
+ mailbox.MH.get_message().
+
- Issue 5585: Add the ability to call an initializer to mulitiprocessing.manager
so that users can install custonm handlers/etc.
More information about the Python-checkins
mailing list