aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-09-08 19:42:11 +0300
committerBerker Peksag <berker.peksag@gmail.com>2016-09-08 19:42:11 +0300
commitd8b7770a0e4a79280a3b5346ae8a6593ea74facf (patch)
tree40f3ddd8432831e37b967a3c6ad67732bb5f01c8 /Lib/email/mime
parentclinic: PY_LONG_LONG -> long long (diff)
parentIssue #27445: Don't pass str(_charset) to MIMEText.set_payload() (diff)
downloadcpython-d8b7770a0e4a79280a3b5346ae8a6593ea74facf.tar.gz
cpython-d8b7770a0e4a79280a3b5346ae8a6593ea74facf.tar.bz2
cpython-d8b7770a0e4a79280a3b5346ae8a6593ea74facf.zip
Issue #27445: Merge from 3.5
Diffstat (limited to 'Lib/email/mime')
-rw-r--r--Lib/email/mime/text.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/email/mime/text.py b/Lib/email/mime/text.py
index 87de8d235f9..35b44238300 100644
--- a/Lib/email/mime/text.py
+++ b/Lib/email/mime/text.py
@@ -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)