diff options
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 da03086..35b4423 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. @@ -36,7 +36,7 @@ class MIMEText(MIMENonMultipart): except UnicodeEncodeError: _charset = 'utf-8' - MIMENonMultipart.__init__(self, 'text', _subtype, + MIMENonMultipart.__init__(self, 'text', _subtype, policy=policy, **{'charset': str(_charset)}) self.set_payload(_text, _charset) |