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/application.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/application.py')
| -rw-r--r-- | Lib/email/mime/application.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/email/mime/application.py b/Lib/email/mime/application.py index f5c5905..6877e55 100644 --- a/Lib/email/mime/application.py +++ b/Lib/email/mime/application.py @@ -14,7 +14,7 @@ class MIMEApplication(MIMENonMultipart): """Class for generating application/* MIME documents.""" def __init__(self, _data, _subtype='octet-stream', - _encoder=encoders.encode_base64, **_params): + _encoder=encoders.encode_base64, *, policy=None, **_params): """Create an application/* type MIME document. _data is a string containing the raw application data. @@ -31,6 +31,7 @@ class MIMEApplication(MIMENonMultipart): """ if _subtype is None: raise TypeError('Invalid application MIME subtype') - MIMENonMultipart.__init__(self, 'application', _subtype, **_params) + MIMENonMultipart.__init__(self, 'application', _subtype, policy=policy, + **_params) self.set_payload(_data) _encoder(self) |
