Mercurial > p > roundup > code
diff roundup/mailgw.py @ 4981:7f8f27ce1a06
Remove rfc2822.py
A majority of the module is not being used, and the one function that is
being used can easily be replicated in mailgw.py, meaning that
everything related to the rfc2822 module can be removed.
| author | John Kristensen <john@jerrykan.com> |
|---|---|
| date | Sun, 11 May 2014 01:05:58 +1000 |
| parents | 13f8f88ad984 |
| children | a46d5d0fd5f8 |
line wrap: on
line diff
--- a/roundup/mailgw.py Fri Feb 27 00:48:25 2015 +1100 +++ b/roundup/mailgw.py Sun May 11 01:05:58 2014 +1000 @@ -85,7 +85,7 @@ from anypy.email_ import decode_header -from roundup import configuration, hyperdb, date, password, rfc2822, exceptions +from roundup import configuration, hyperdb, date, password, exceptions from roundup.mailer import Mailer, MessageSendError from roundup.i18n import _ from roundup.hyperdb import iter_roles @@ -320,8 +320,9 @@ data = self.fp.read() # Encode message to unicode - charset = rfc2822.unaliasCharset(self.getparam("charset")) + charset = self.getparam("charset") if charset: + charset = charset.lower().replace("windows-", 'cp') # Do conversion only if charset specified - handle # badly-specified charsets edata = unicode(data, charset, 'replace').encode('utf-8')
