diff options
| author | J08nY | 2017-07-07 01:40:06 +0200 |
|---|---|---|
| committer | J08nY | 2017-07-07 01:40:06 +0200 |
| commit | 6b627e130ad1a2fa453045b76b8f9a08e9520c34 (patch) | |
| tree | 59bc04648171414ac90aab872b589f0873a1049f /src/mailman_pgp/runners | |
| parent | 2c4c5cb0c122d3bf6700276ec6cdd2c28ba36a9a (diff) | |
| download | mailman-pgp-6b627e130ad1a2fa453045b76b8f9a08e9520c34.tar.gz mailman-pgp-6b627e130ad1a2fa453045b76b8f9a08e9520c34.tar.zst mailman-pgp-6b627e130ad1a2fa453045b76b8f9a08e9520c34.zip | |
Diffstat (limited to 'src/mailman_pgp/runners')
| -rw-r--r-- | src/mailman_pgp/runners/incoming.py | 3 | ||||
| -rw-r--r-- | src/mailman_pgp/runners/outgoing.py | 5 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mailman_pgp/runners/incoming.py b/src/mailman_pgp/runners/incoming.py index 2941502..5057d2b 100644 --- a/src/mailman_pgp/runners/incoming.py +++ b/src/mailman_pgp/runners/incoming.py @@ -56,7 +56,8 @@ class IncomingRunner(Runner): # Decrypt it and pass it on. list_key = pgp_list.key if list_key is None: - raise ValueError('List key not found.') + # keep the message and hope the key generates. + return True msg = wrapped.decrypt(list_key) else: # Take the `nonencrypted_msg_action` diff --git a/src/mailman_pgp/runners/outgoing.py b/src/mailman_pgp/runners/outgoing.py index 89125a7..de56bbb 100644 --- a/src/mailman_pgp/runners/outgoing.py +++ b/src/mailman_pgp/runners/outgoing.py @@ -31,11 +31,10 @@ from mailman_pgp.model.list import PGPMailingList class OutgoingRunner(Runner): def _dispose(self, mlist: MailingList, msg: Message, msgdata: dict): """See `IRunner`.""" - pgp_list = PGPMailingList.query().filter_by( - list_id=mlist.list_id).first() + pgp_list = PGPMailingList.for_list(mlist) if not pgp_list: outq = config.get('queues', 'out') mailman_config.switchboards[outq].enqueue(msg, msgdata, listid=mlist.list_id) - return False + return False |
