aboutsummaryrefslogtreecommitdiff
path: root/src/mailman_pgp/plugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman_pgp/plugin.py')
-rw-r--r--src/mailman_pgp/plugin.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mailman_pgp/plugin.py b/src/mailman_pgp/plugin.py
index 033c46d..3ef771c 100644
--- a/src/mailman_pgp/plugin.py
+++ b/src/mailman_pgp/plugin.py
@@ -1,4 +1,5 @@
"""A PGP plugin for GNU Mailman."""
+
from mailman.interfaces.listmanager import ListDeletedEvent
from mailman.interfaces.plugin import IPlugin
from public import public
@@ -35,5 +36,6 @@ def on_delete(mlist):
encrypted_list = config.db.session.query(EncryptedMailingList).filter_by(
list_id=mlist.list_id).first()
if encrypted_list:
- with transaction():
- config.db.session.delete(encrypted_list)
+ with transaction() as session:
+ # TODO shred the list key
+ session.delete(encrypted_list)