parameters: (self)
return_statement: return features
docstring: Get message signature features.
docstring_summary: Get message signature features.
docstring_tokens: Get message signature features .
function: 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
function_tokens: 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