summaryrefslogtreecommitdiffstats
path: root/Lib/email/mime/application.py
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2016-09-07 20:48:35 (GMT)
committerR David Murray <rdmurray@bitdance.com>2016-09-07 20:48:35 (GMT)
commit56b1f1b4d5edef1ca6184225145cffc59d2b3b5d (patch)
tree305f7b097d8798b86f376a10cc27f928cb27d7a2 /Lib/email/mime/application.py
parent3788b85628eb9e8e802374303e14c04b6a817d97 (diff)
downloadcpython-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.py5
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)