mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Issue #27445: Don't pass str(_charset) to MIMEText.set_payload()
Patch by Claude Paroz.
This commit is contained in:
parent
82733fac8d
commit
2b2a9be913
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,
|
||||
**{'charset': _charset})
|
||||
**{'charset': str(_charset)})
|
||||
|
||||
self.set_payload(_text, _charset)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue