Commit 548ac410 authored by R. David Murray's avatar R. David Murray

In 3k this becomes an items() call.

Merged revisions 71046 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71046 | r.david.murray | 2009-04-02 10:05:35 -0400 (Thu, 02 Apr 2009) | 4 lines

  Add missing iteritems() call to the for loop in mailbox.MH.get_message().

  Fixes issue2625.
........
parent 0633d760
...@@ -907,7 +907,7 @@ class MH(Mailbox): ...@@ -907,7 +907,7 @@ class MH(Mailbox):
_unlock_file(f) _unlock_file(f)
finally: finally:
f.close() f.close()
for name, key_list in self.get_sequences(): for name, key_list in self.get_sequences().items():
if key in key_list: if key in key_list:
msg.add_sequence(name) msg.add_sequence(name)
return msg return msg
......
...@@ -931,6 +931,12 @@ class TestMH(TestMailbox): ...@@ -931,6 +931,12 @@ class TestMH(TestMailbox):
self._box.remove(key1) self._box.remove(key1)
self.assertEqual(self._box.get_sequences(), {'flagged':[key0]}) self.assertEqual(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): def test_pack(self):
# Pack the contents of the mailbox # Pack the contents of the mailbox
msg0 = mailbox.MHMessage(self._template % 0) msg0 = mailbox.MHMessage(self._template % 0)
......
...@@ -58,6 +58,9 @@ Core and Builtins ...@@ -58,6 +58,9 @@ Core and Builtins
Library Library
------- -------
- Issue 2625: added missing items() call to the for loop in
mailbox.MH.get_message().
- Issue #5640: Fix _multibytecodec so that CJK codecs don't repeat - Issue #5640: Fix _multibytecodec so that CJK codecs don't repeat
error substitutions from non-strict codec error callbacks in error substitutions from non-strict codec error callbacks in
incrementalencoder and StreamWriter. incrementalencoder and StreamWriter.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment