mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Issue #27445: Merge from 3.5
This commit is contained in:
commit
d8b7770a0e
3 changed files with 8 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue