R. David Murray added the comment:

replace_header has a different semantic than del-and-set (replace_header leaves 
the header in the same location in the list, rather than appending it to the 
end...that's it's purpose).  If replace_header is throwing a key error, then I 
guess we need a look-before-you-leap if statement.

And a test :)

Note that a correct fix would preserve the broken input email, but since we're 
obviously already doing munging I'm fine with just making this work for now.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27321>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to