Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaced Message.get_charset() with Message.get_content_charset():
Fixes the bug described here: repoze#41 Rationale: get_content_charset() has been there in email.message.Message for a long time now, returning the charset of the body of the Message (which is what we are looking for there). get_charset() has been deprecated for some time now, returns None by default (even if a charset is set in the Content-Type header). There are some other ways to retrieve the charset (get_params(), get_param('charset'), message['Content-Type'].params) but get_content_charset() is the only one that exists through all existing python versions, and it is there even in the new email.message.EmailMessage class.
- Loading branch information