From 2da30c19dbb5b3bac05d7db759091dd16447aa01 Mon Sep 17 00:00:00 2001 From: J08nY Date: Thu, 22 Jun 2017 14:13:32 +0200 Subject: Switch Incoming Runner to only care about encryption. --- src/mailman_pgp/runners/incoming.py | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/mailman_pgp/runners/incoming.py b/src/mailman_pgp/runners/incoming.py index 156cf78..d59b1a5 100644 --- a/src/mailman_pgp/runners/incoming.py +++ b/src/mailman_pgp/runners/incoming.py @@ -25,8 +25,7 @@ from public import public from mailman_pgp.config import config from mailman_pgp.model.list import EncryptedMailingList -from mailman_pgp.pgp.inline import InlineWrapper -from mailman_pgp.pgp.mime import MIMEWrapper +from mailman_pgp.pgp.wrapper import PGPWrapper @public @@ -42,19 +41,10 @@ class IncomingRunner(Runner): mailman_config.switchboards[inq].enqueue(msg, msgdata, listid=mlist.list_id) return False + + wrapped = PGPWrapper(msg) # Is the message encrypted? - mime = MIMEWrapper(msg) - inline = InlineWrapper(msg) - if mime.is_signed(): - # only signed. - pass - elif mime.is_encrypted(): - # definitely encrypted, might still be signed - pass - elif inline.is_signed(): - pass - elif inline.is_encrypted(): + if wrapped.is_encrypted(): pass else: - # not encrypted or signed pass -- cgit v1.3.1