diff options
author | R David Murray <rdmurray@bitdance.com> | 2016-09-07 16:48:35 -0400 |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2016-09-07 16:48:35 -0400 |
commit | 56b1f1b4d5edef1ca6184225145cffc59d2b3b5d (patch) | |
tree | 305f7b097d8798b86f376a10cc27f928cb27d7a2 /Lib/email/mime/text.py | |
parent | 3788b85628eb9e8e802374303e14c04b6a817d97 (diff) | |
download | cpython-git-56b1f1b4d5edef1ca6184225145cffc59d2b3b5d.tar.gz |
#27331: add policy keyword argument to all MIME subclasses.
Patch by Berker Peksag.
Diffstat (limited to 'Lib/email/mime/text.py')
-rw-r--r-- | Lib/email/mime/text.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/email/mime/text.py b/Lib/email/mime/text.py index 479928ec94..87de8d235f 100644 --- a/Lib/email/mime/text.py +++ b/Lib/email/mime/text.py @@ -14,7 +14,7 @@ from email.mime.nonmultipart import MIMENonMultipart class MIMEText(MIMENonMultipart): """Class for generating text/* type MIME documents.""" - def __init__(self, _text, _subtype='plain', _charset=None): + def __init__(self, _text, _subtype='plain', _charset=None, *, policy=None): """Create a text/* type MIME document. _text is the string for this message object. @@ -38,7 +38,7 @@ class MIMEText(MIMENonMultipart): if isinstance(_charset, Charset): _charset = str(_charset) - MIMENonMultipart.__init__(self, 'text', _subtype, + MIMENonMultipart.__init__(self, 'text', _subtype, policy=policy, **{'charset': _charset}) self.set_payload(_text, _charset) |