diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-12-16 19:00:55 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-12-16 19:00:55 +0200 |
commit | 3bb38e2e61977ff815de6c33a516d2bd98fcbfd9 (patch) | |
tree | 56d1cf2051a44ffba627fd719bc25431bc43b41e /Lib/email/mime/application.py | |
parent | 47e124a68b8201284c0b01ff9d1c08abf0059a27 (diff) | |
parent | 5188d1bcdb133ee8f36a7d2efc14562ce91c8ff7 (diff) | |
download | cpython-3bb38e2e61977ff815de6c33a516d2bd98fcbfd9.tar.gz |
Issue #14061: Misc fixes and cleanups in archiving code in shutil.
Imporoved the documentation and tests for make_archive() and unpack_archive().
Improved error handling when corresponding compress module is not available.
Brake circular dependency between shutil and tarfile modules.
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 f5c5905564..6877e554e1 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) |