=== modified file 'Lib/mailbox.py' --- Lib/mailbox.py 2008-08-04 01:43:43 +0000 +++ Lib/mailbox.py 2009-03-29 20:06:33 +0000 @@ -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 file 'Lib/test/test_mailbox.py' --- Lib/test/test_mailbox.py 2008-08-05 01:00:57 +0000 +++ Lib/test/test_mailbox.py 2009-03-29 20:07:48 +0000 @@ -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)