diff options
| author | R David Murray <rdmurray@bitdance.com> | 2016-09-07 20:48:35 (GMT) |
|---|---|---|
| committer | R David Murray <rdmurray@bitdance.com> | 2016-09-07 20:48:35 (GMT) |
| commit | 56b1f1b4d5edef1ca6184225145cffc59d2b3b5d (patch) | |
| tree | 305f7b097d8798b86f376a10cc27f928cb27d7a2 /Lib/email/mime/message.py | |
| parent | 3788b85628eb9e8e802374303e14c04b6a817d97 (diff) | |
| download | cpython-56b1f1b4d5edef1ca6184225145cffc59d2b3b5d.zip cpython-56b1f1b4d5edef1ca6184225145cffc59d2b3b5d.tar.gz cpython-56b1f1b4d5edef1ca6184225145cffc59d2b3b5d.tar.bz2 | |
#27331: add policy keyword argument to all MIME subclasses.
Patch by Berker Peksag.
Diffstat (limited to 'Lib/email/mime/message.py')
| -rw-r--r-- | Lib/email/mime/message.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/email/mime/message.py b/Lib/email/mime/message.py index 275dbfd..07e4f2d 100644 --- a/Lib/email/mime/message.py +++ b/Lib/email/mime/message.py @@ -14,7 +14,7 @@ from email.mime.nonmultipart import MIMENonMultipart class MIMEMessage(MIMENonMultipart): """Class representing message/* MIME documents.""" - def __init__(self, _msg, _subtype='rfc822'): + def __init__(self, _msg, _subtype='rfc822', *, policy=None): """Create a message/* type MIME document. _msg is a message object and must be an instance of Message, or a @@ -24,7 +24,7 @@ class MIMEMessage(MIMENonMultipart): default is "rfc822" (this is defined by the MIME standard, even though the term "rfc822" is technically outdated by RFC 2822). """ - MIMENonMultipart.__init__(self, 'message', _subtype) + MIMENonMultipart.__init__(self, 'message', _subtype, policy=policy) if not isinstance(_msg, message.Message): raise TypeError('Argument is not an instance of Message') # It's convenient to use this base class method. We need to do it |
