Merge pull request #5146 from achillesrasquinha/py3

[FIX] safe decode for 3
This commit is contained in:
Achilles Rasquinha 2018-03-08 17:19:32 +05:30 committed by GitHub
commit 925c35eee2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -399,7 +399,7 @@ class Email:
self.subject = safe_decode(self.subject, _subject[0][1])
else:
# assume that the encoding is utf-8
self.subject = safe_decode(subject)[:140]
self.subject = safe_decode(self.subject)[:140]
if not self.subject:
self.subject = "No Subject"