(self)
return features
Get message signature features.
Get message signature features.
Get message signature features .
def get_signature_informations(self):
        """Get message signature features."""
        signed_parts = [x for x in self.message.attachments
                        if 'pgp-sign' in x.content_type]
        if not signed_parts:
            return {}
        sign = pgpy.PGPSignature()
        features = {'message_signed': True,
                    'message_signature_type': 'PGP'}
        try:
            sign.parse(signed_parts[0].data)
            features.update({'message_signer': sign.signer})
        except Exception as exc:
            log.error('Unable to parse pgp signature {}'.format(exc))
        return features
def get_signature_informations ( self ) : signed_parts = [ x for x in self . message . attachments if 'pgp-sign' in x . content_type ] if not signed_parts : return { } sign = pgpy . PGPSignature ( ) features = { 'message_signed' : True , 'message_signature_type' : 'PGP' } try : sign . parse ( signed_parts [ 0 ] . data ) features . update ( { 'message_signer' : sign . signer } ) except Exception as exc : log . error ( 'Unable to parse pgp signature {}' . format ( exc ) ) return features