diff options
| author | J08nY | 2017-07-13 23:51:42 +0200 |
|---|---|---|
| committer | J08nY | 2017-07-13 23:51:42 +0200 |
| commit | 03314a50895615623f5f0c80d77076657348ad05 (patch) | |
| tree | 7a547fe7caba0b196243bdedb4bd8cf68f810521 /src/mailman_pgp/pgp/mime.py | |
| parent | af5b7950923022c0476cbc576cd8536d18c39ef6 (diff) | |
| download | mailman-pgp-03314a50895615623f5f0c80d77076657348ad05.tar.gz mailman-pgp-03314a50895615623f5f0c80d77076657348ad05.tar.zst mailman-pgp-03314a50895615623f5f0c80d77076657348ad05.zip | |
Diffstat (limited to 'src/mailman_pgp/pgp/mime.py')
| -rw-r--r-- | src/mailman_pgp/pgp/mime.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mailman_pgp/pgp/mime.py b/src/mailman_pgp/pgp/mime.py index 975b8bd..a7e31b8 100644 --- a/src/mailman_pgp/pgp/mime.py +++ b/src/mailman_pgp/pgp/mime.py @@ -76,7 +76,8 @@ class MIMEWrapper: if not self._is_mime(): return False second_type = self.msg.get_payload(1).get_content_type() - protocol_param = collapse_rfc2231_value(self.msg.get_param('protocol')) + protocol_param = collapse_rfc2231_value(self.msg.get_param('protocol', + '')) content_subtype = self.msg.get_content_subtype() return (second_type == MIMEWrapper._signed_type and @@ -102,7 +103,8 @@ class MIMEWrapper: first_type = self.msg.get_payload(0).get_content_type() second_type = self.msg.get_payload(1).get_content_type() content_subtype = self.msg.get_content_subtype() - protocol_param = collapse_rfc2231_value(self.msg.get_param('protocol')) + protocol_param = collapse_rfc2231_value(self.msg.get_param('protocol', + '')) return ('Version: 1' in first_part and first_type == MIMEWrapper._encrypted_type and |
