diff options
Diffstat (limited to 'src/mailman_pgp')
| -rw-r--r-- | src/mailman_pgp/pgp/mime_multisig.py | 18 | ||||
| -rw-r--r-- | src/mailman_pgp/pgp/tests/test_wrapper.py | 3 |
2 files changed, 11 insertions, 10 deletions
diff --git a/src/mailman_pgp/pgp/mime_multisig.py b/src/mailman_pgp/pgp/mime_multisig.py index 1dbb73c..fb06cad 100644 --- a/src/mailman_pgp/pgp/mime_multisig.py +++ b/src/mailman_pgp/pgp/mime_multisig.py @@ -170,15 +170,15 @@ class MIMEMultiSigWrapper(MIMEWrapper): self.msg.set_param('micalg', micalg) second_part = MIMEMultipart() for signature in decrypted.signatures: - sig_part = MIMEApplication(_data=str(signature), - _subtype=MIMEWrapper._signature_subtype, - _encoder=encode_7or8bit, - name='signature.asc') - sig_part.add_header('Content-Description', - 'OpenPGP digital signature') - sig_part.add_header('Content-Disposition', 'attachment', - filename='signature.asc') - second_part.attach(sig_part) + sig = MIMEApplication(_data=str(signature), + _subtype=MIMEWrapper._signature_subtype, + _encoder=encode_7or8bit, + name='signature.asc') + sig.add_header('Content-Description', + 'OpenPGP digital signature') + sig.add_header('Content-Disposition', 'attachment', + filename='signature.asc') + second_part.attach(sig) self.msg.attach(second_part) else: # result should be diff --git a/src/mailman_pgp/pgp/tests/test_wrapper.py b/src/mailman_pgp/pgp/tests/test_wrapper.py index b49eece..9d5a383 100644 --- a/src/mailman_pgp/pgp/tests/test_wrapper.py +++ b/src/mailman_pgp/pgp/tests/test_wrapper.py @@ -243,4 +243,5 @@ class TestPGPWrapper(PGPWrapperTestCase): PGPWrapper(self.msg) for wrap_class in (InlineWrapper, MIMEWrapper, MIMEMultiSigWrapper): PGPWrapper(self.msg, default=wrap_class) - self.assertRaises(ValueError, PGPWrapper, self.msg, default='Not a class') + self.assertRaises(ValueError, PGPWrapper, self.msg, + default='Not a class') |
