From 248ca38ffb4821a131460c9953aa21d6fe7cec04 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Mon, 18 May 2020 10:01:51 -0700 Subject: Extend REFUSE_SECOND_PENDING to unsubscription as well. --- Mailman/Commands/cmd_unsubscribe.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Mailman/Commands/cmd_unsubscribe.py') diff --git a/Mailman/Commands/cmd_unsubscribe.py b/Mailman/Commands/cmd_unsubscribe.py index 9ffa80cd..3a156536 100644 --- a/Mailman/Commands/cmd_unsubscribe.py +++ b/Mailman/Commands/cmd_unsubscribe.py @@ -73,9 +73,14 @@ approval.""")) # No password was given, so we need to do a mailback confirmation # instead of unsubscribing them here. cpaddr = mlist.getMemberCPAddress(address) - mlist.ConfirmUnsubscription(cpaddr) - # We don't also need to send a confirmation to this command - res.respond = 0 + try: + mlist.ConfirmUnsubscription(cpaddr) + except Errors.MMAlreadyPending: + res.results.append( + _('You already have a subscription pending confirmation')) + else: + # We don't also need to send a confirmation to this command + res.respond = 0 else: # No admin approval is necessary, so we can just delete them if the # passwords match. -- cgit v1.2.3