diff options
author | R. David Murray <rdmurray@bitdance.com> | 2009-04-02 14:05:35 (GMT) |
---|---|---|
committer | R. David Murray <rdmurray@bitdance.com> | 2009-04-02 14:05:35 (GMT) |
commit | 52720c5455c3cfe200988aead6252e60ed507738 (patch) | |
tree | eca44596ee5c5832ffa886ee6794063a78a2f51c | |
parent | e2942d073d4b8a1f9b5f48c73855f409e6b900b2 (diff) | |
download | cpython-52720c5455c3cfe200988aead6252e60ed507738.zip cpython-52720c5455c3cfe200988aead6252e60ed507738.tar.gz cpython-52720c5455c3cfe200988aead6252e60ed507738.tar.bz2 |
Add missing iteritems() call to the for loop in mailbox.MH.get_message().
Fixes issue2625.
-rwxr-xr-x | Lib/mailbox.py | 2 | ||||
-rw-r--r-- | Lib/test/test_mailbox.py | 6 | ||||
-rw-r--r-- | Misc/NEWS | 3 |
3 files changed, 10 insertions, 1 deletions
diff --git a/Lib/mailbox.py b/Lib/mailbox.py index 7651e53..7e0689c 100755 --- a/Lib/mailbox.py +++ b/Lib/mailbox.py @@ -911,7 +911,7 @@ class MH(Mailbox): _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 diff --git a/Lib/test/test_mailbox.py b/Lib/test/test_mailbox.py index bec51e5..714bf25 100644 --- a/Lib/test/test_mailbox.py +++ b/Lib/test/test_mailbox.py @@ -936,6 +936,12 @@ class TestMH(TestMailbox): 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) @@ -202,6 +202,9 @@ Core and Builtins 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. |