commit a8daa33de3e35d8108a7a0ee358d0b968f95d820 Author: Isis Lovecruft isis@torproject.org Date: Sat May 17 02:23:00 2014 +0000
Fix Python2.7.3 UnicodeDecodeError in MailMessage.getIncoming(). --- lib/bridgedb/email/server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/bridgedb/email/server.py b/lib/bridgedb/email/server.py index 5b7ceb2..d011be4 100644 --- a/lib/bridgedb/email/server.py +++ b/lib/bridgedb/email/server.py @@ -515,7 +515,8 @@ class MailMessage(object): :returns: A ``Message`` comprised of all lines received thus far. """ rawMessage = io.StringIO() - rawMessage.writelines([unicode('{0}\n'.format(ln)) for ln in self.lines]) + for ln in self.lines: + rawMessage.writelines(unicode(ln) + unicode('\n')) rawMessage.seek(0) return smtp.rfc822.Message(rawMessage)
tor-commits@lists.torproject.org