Issue #27445: Merge from 3.5

This commit is contained in:
Berker Peksag 2016-09-08 19:42:11 +03:00
commit d8b7770a0e
3 changed files with 8 additions and 4 deletions

View file

@ -35,10 +35,8 @@ class MIMEText(MIMENonMultipart):
_charset = 'us-ascii'
except UnicodeEncodeError:
_charset = 'utf-8'
if isinstance(_charset, Charset):
_charset = str(_charset)
MIMENonMultipart.__init__(self, 'text', _subtype, policy=policy,
**{'charset': _charset})
**{'charset': str(_charset)})
self.set_payload(_text, _charset)